Hi, I'm very new to OpenStreetMap but I want to build a small java program who converts Latitude and Longitude from GPS to the nearest street address. I know the basics of java so a i know how to create a GUI for input/output, so that's not the problem. I just don't know how to use OpenStreetMap API to convert the lat/long to a street address. Could anybody get me on the right track? Thx Fred asked 07 Apr '14, 14:51 FredGoe |
The process of converting lat/lon to an address is called "Reverse Geocoding". The OSM API is not suitable for that but the Nominatim service does a decent job at reverse geocoding. All that's left for you is send a HTTP request and parse the response. Note that this is subject to usage restrictions (don't bulk geocode tons of addresses). If you want to implement your own reverse geocoder (not recommended - lots of work to get it right) then you will probably want to import raw OSM data and preprocess it suitably. You could possibly use the Osmosis library for that (also Java). answered 07 Apr '14, 16:20 Frederik Ramm ♦ |