views:

37

answers:

1

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 the distance between "user inputed spot" and "record position".

any suggestions or web link would be appreciated.

thank you all in advance

+2  A: 

Hi!

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.

Markus Winand