2

i'm a bit new to GIS and i want to search for the k-nearest neighbor in my DB (mySQL) . from what i understand the options are: 1) use the Haverstine formula - but it will run on the entire DB, i know i can add indexs to the lat and long to improve things.. 2) use expanding area as described here : http://blogs.msdn.com/b/isaac/archive/2008/10/23/nearest-neighbors.aspx 3) use Bounding Boxes as described here: http://code.google.com/intl/iw-IL/appengine/articles/geosearch.html 4) using point and MBRContains function as described here: Fastest Way to Find Distance Between Two Lat/Long Points

i'm wondering what are the pros and cons of each way, and which one (or combination) is best for obtaining a FAST and mildly accurate results. in addition, should i use points & polygons or just lat/long? i know this topic has been discussed here more then once but i'm still not sure what the answer is. TNX

Community
  • 1
  • 1
oferiko
  • 1,927
  • 2
  • 16
  • 17

1 Answers1