GeoNames supports reverse geocoding

GeoNames is YAG (yet another geocoder), but behind the curtains lie many cool features. The most unique of which is a reverse geocoder.

Reverse geocoding is converting Latitude & Longitude to a place name. This is the other side of the mirror from traditional geocoding, which converts a place name into latitude & longitude. Why would someone want to reverse geocode you ask? With reverse geocoding you can convert your GPS tracklogs into meaningful locations easily, or allow users to click on a map and get back actual location of where they're clicking.

The GeoNames API provides an interface for getting nearby postal codes, country, or most specific: place names.

Example


HighEarthOrbit offices: http://ws.geonames.org/findNearbyPlaceName?lat=42.4266&lng=-83.4931&style=full

returns:



Northville
42.43111
-83.48333
5003956
US
United States
P
PPL
city, village,...
populated place

6360
252
MI
Michigan




The whole geo-enchilada


Lastly, to make you really feel warm and good inside, the GeoNames database is provided for direct download under a Creative Commons Attribution license. Yum, free data.

See the GeoNames Blog post about it.

About this article

written on
posted in TechnologyProgrammingGeolocationHowto Back to Top

About the Author

Andrew Turner is an advocate of open standards and open data. He is actively involved in many organizations developing and supporting open standards, including OpenStreetMap, Open Geospatial Consortium, Open Web Foundation, OSGeo, and the World Wide Web Consortium. He co-founded CrisisCommons, a community of volunteers that, in coordination with government agencies and disaster response groups, build technology tools to help people in need during and after a crisis such as an earthquake, tsunami, tornado, hurricane, flood, or wildfire.