Reverse Geocoding
| Project: | GMap Module |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
I have a sort of waymarking website. Users can create new waymarks or spots as I call them. When creating a spot they can either enter an address and click Map It, which will geocode the address and add the marker the map. Then when they submit the new "spot" the Address and the geocode info gets submitted to the database.
Is there a way to reverse this process. For example, if the user doesn't know the address, they can find it on the map and when they click on the map, the address is then found using the lat and lon info.
http://www.geonames.org/maps/reverse-geocoder.html Here is an example of a site that does this process. What would be the best way to do this. I have experience in PHP programming and am just starting out in drupal. I have been diving into the GMap module and if you could point me in the right direction I would be able to write this up myself.

#1
Subscribing. Very interested in this as well.
#2
It looks like the geonames.org site also will return the XML address information if given a Lat/Long:
http://ws.geonames.org/findNearestAddress?lat=39.542305&lng=-105.010866
This page describes the service:
http://www.geonames.org/export/
It looks like they will let you use 50,000 lookups per day.
This is a wonderful service ... glad you found it cday119 ... Thanks for putting it here.
#3
From my experience with Google Maps, it returns information which it believes accurately reflects said Location when you GeoCode. I've used this scheme to fill in City / Province / Country information for a Drupal website I've done which doesn't use the location module: http://memphismls.com/ . Users simply input Address and ZipCode and I get the City, State information from Google.
I think it would be a good idea to fill in this info when the user does not provide it. I believe you'll have it from the GeoCode request and you'll simply have to input it.
By default, GMaps module doesn't ask for City, State, Country information, so while I can display a map and lat/long, I'm not able to provide the City name to my users, which is lame.
For now I'm just going to force the people to enter it.
#4
Subscribing, interested in changing the user-input by reverse geocoding of lat/lon.
greetings,
Martijn
#5
Appears Googlemaps is now actually supporting this feature. They did it before, but you were not supposed to use Google Maps for reverse Geocoding even though, it was possible.
I noticed a "New" feature when I checked out Google Maps today to register a key. If anyone is interested, here's the documentation:
http://code.google.com/apis/maps/documentation/services.html#ReverseGeoc...
#6
Here's a application interface to the Google Maps API referenced above, it allows for free bulk reverse geocoding:
http://www.batchgeocode.com/reverse/
Could be useful for folks who'd like to pre-cache the results to a database instead of reverse geocoding every time. Or those who can't create their own programs to access the Google Maps API.