I would suggest that just storing lat/long is not enough. You could perhaps use http://www.geonames.org/export/place-hierarchy.html#hierarchy to get the hierarchy of places relating to your locations, and store them in your database.
You ca then run a search for all places with 'Amsterdam' in the stored places. You could also build up a tree structure of places, so find the surrounding areas (neighbours) to Amsterdam and include them in your search. Or just do a combination, find all the ones 'in Amsterdam' and then do a radius search (with a distance filter) , to find the other closeish ones. Alternatively http://code.flickr.com/blog/2008/10/30/the-shape-of-alpha/ gives you an alternative source of classifying your locations with locations. On 10/03/2009, Asif <[email protected]> wrote: > > Hi, > > I am creating an application with Geo Proximity Search capability > using PHP as server scripting language and MySQL as Databse. > > Consider a situation: > > Where we have certain set of objects having latitude and longitude > positions assosciated with respective objects. On specifying location > details like country and/or city along with range/radius in KM we are > getting objects that are lying withing that radius/range using MySQL > query for example: > > "SELECT [columns] FROM [column] WHERE 1=1 AND 3963.191 * ACOS((SIN(PI > () * [latitude] / 180) * SIN(PI() * [column].latitude / 180)) + (COS > (PI > () * [latitude] /180) * cos(PI() * [column].latitude / 180) * COS(PI() > * [column].longitude / 180 - PI() * [longitude] / 180)) ) <= 10" > > Above calculations will give the objects that are within the 10 KM > area from the country/city center point on earth. > > For e.g. i wanna to find out all the stores which resides in Amsterdam > for instance ( without specifying any radius limit). > > The application should find out all the stores that are located in > Amsterdam, also the stores which are not exactly located in Amsterdam > but nearby having service range up to Amsterdam. > > I am maintaining these stores along with lat/lng position and with/ > without service range. > > Anybody help me find out solution? > > > > > -- Barry - www.nearby.org.uk - www.geograph.org.uk - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
