What is the best approach of querying based on Geo parameter
I have a table which contains Geo-Based information. (latitude and longitude)
i would like users to input their Latitude and Longitude value(e.g current location), then query returns the records ordered by t开发者_JS百科he distance between "user inputed spot" and "record position".
any suggestions or web link would be appreciated.
thank you all in advance
Try searching for "spatial index". You didn't mention any DB product, but many have support for that.
e.g. MS: http://technet.microsoft.com/en-us/library/bb964712.aspx
oracle: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_intro.htm#BAJJIFJJ
it is, however, not a 5-minutes task. you might need a few days to work it out.
精彩评论