GeoNames Home | Postal Codes | Download / Webservice | About |
click on the map to view reverse geocoded street names. |
|
geocode address :
The geocoder is using google geocoder,
reverse geocoding is provided by geonames using the US Census "Tiger Line" data set. Click on the map to view reverse geocoded street names. |
Url : api.geonames.org/findNearestAddress?
Parameters : lat,lng, (or optionally lats,lngs for array of lat/lng pair); radius in km (default=0.2); maxRows (default=1)
Restriction : this webservice is only available for the US.
Result : returns the nearest address for the given latitude/longitude, the street number is an 'educated guess' using an interpolation of street number at the end of a street segment.
Example http://api.geonames.org/findNearestAddress?lat=37.451&lng=-122.18&username=demo
This service is also available in JSON format :
http://api.geonames.org/findNearestAddressJSON?lat=37.451&lng=-122.18&username=demo
Url : api.geonames.org/findNearestIntersection?
Parameters : lat,lng;
filter: only return intersections with streets of a mtfcc equal or higher then the filter
Restriction : this webservice is only available for the US.
Result : returns the nearest intersection for the given latitude/longitude
Example http://api.geonames.org/findNearestIntersection?lat=37.451&lng=-122.18&username=demo
This service is also available in JSON format :
http://api.geonames.org/findNearestIntersectionJSON?lat=37.451&lng=-122.18&username=demo
Url : api.geonames.org/findNearbyStreets?
Parameters : lat,lng;
optional: maxRows: number of rows returned, radius: radius in km
Restriction : this webservice is only available for the US.
Result : returns the nearest street segments for the given latitude/longitude
Example http://api.geonames.org/findNearbyStreets?lat=37.451&lng=-122.18&username=demo
This service is also available in JSON format :
http://api.geonames.org/findNearbyStreetsJSON?lat=37.451&lng=-122.18&username=demo
Returned Elements :
line : line string with lng lat points, points are comma separated
mtfcc : MAF/TIGER Feature Class Code
name : street name
fraddl : from address left
fraddr : from address right
toaddl : to address left
toaddr : to address right
the other elments are selfexplaining.