NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum


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's gravatar image

accept rate: 0%

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).

permanent link

answered 07 Apr '14, 16:20

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%


Thanks for the help! You've set me on the right track :)

(08 Apr '14, 09:44) FredGoe
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 07 Apr '14, 14:51

question was seen: 32,736 times

last updated: 08 Apr '14, 10:25

NOTICE: is being shutdown on 1st March 2024. Please use the OpenStreetMap Community Forum