title: Clustering Lat/Longs in a Database
body: <p>I'm trying to see if anyone knows how to cluster some Lat/Long results, using a database, to reduce the number of results sent over the wire to the application.</p>
  
  <p>There are a number of resources about how to cluster, either on the client side OR in the server (application) side .. but not in the database side :(</p>
  
  <p><a href="https://stackoverflow.com/questions/73927/clustering-algorithm-for-mapping-application">This is a similar question</a>, asked by a fellow S.O. member. The solutions are server side based (ie. C# code behind).</p>
  
  <p>Has anyone had any luck or experience with solving this, but in a database? Are there any database guru's out there who are after a hawt and sexy DB challenge?</p>
  
  <p>please help :)</p>
  
  <p>EDIT 1: Clarification - by clustering, i'm hoping to group <code>x</code> number of points into a single point, for an area. So, if i say cluster everything in a 1 mile / 1 km square, then all the results in that 'square' are GROUP'D into a single result (say ... the middle of the square).</p>
  
  <p>EDIT 2: I'm using MS Sql 2008, but i'm open to hearing if there are other solutions in other DB's.</p>