title: Grouping a set of points by proximity
body: <p>I have a few thousand points expressed as a 2D float array of latitudes and longitudes.</p>
  
  <pre><code>(42.385305, -87.963793)
  (41.703427, -88.121665)
  (41.889764, -87.978553)
  (41.995931, -87.787501)
  (42.25875, -87.948199)
                .
                .
                .
  </code></pre>
  
  <p>In this set, the minimum and maximum of the latitudes are 34.03176 and 42.470814, and those of the longitudes are -118.238819 and -87.598201.</p>
  
  <p>I want to group this points into zones of 0.025 latitude and 0.03 longitude, and then consider each zone once, to do some calculations and operations on the points at each zone.</p>
  
  <p>Or, it would be much much better if I could find the area where two or more points are located too closely together, say within 3km radius.</p>
  
  <p>I've thought of using a hash map or 2D array, but then setting effective keys or referencing the right zone is going to be tricky.</p>
  
  <p>R-tree may not be appropriate, as its building is complicated and not efficient, especially considering that I do not need random access. I am traversing each zone one by one, as I mentioned above.</p>
  
  <p>What would be an efficient way to do this?</p>