How does Nominatim reverse-geocode? I'm interested in knowing how the process works, and even trying to optimize it, if possible. I've Googled for an answer but could not find it. How does Nominatim resolve a GPS coordinate into a place?

Thanks in advance

asked 06 Feb '14, 23:05

baekacaek's gravatar image

accept rate: 0%

edited 07 Feb '14, 00:18

aseerel4c26's gravatar image

aseerel4c26 ♦

Please avoid crosspostings as they consume a lot of the ressources that try to help you:

(07 Feb '14, 19:07) iii

The "grunt work" of reverse geocoding in Nominatim is done by the PostGIS database. Nominatim uses a helper program, osm2pgsql, to import OSM data into a PostGIS database, and then queries PostGIS to return the nearest feature to a given coordinate. That's the core of it. (See the SQL query that does this.)

After identifying the nearest feature, Nominatim will go through a few extra database queries to actually give you the full place hierarchy (country, state, city etc.) for it.

permanent link

answered 07 Feb '14, 07:39

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 24%

edited 07 Feb '14, 09:17

Yes, it does reverse-geocode. See section one in Nominatim wiki page.

To see how it works you could see the source code. Also the development overview might be useful for understanding (linked in the intro section).

permanent link

answered 07 Feb '14, 00:17

aseerel4c26's gravatar image

aseerel4c26 ♦
accept rate: 18%


Thanks for the answer. I am fully aware that Nominatim has a reverse geocoding capability. My question was how it does it, not whether or not it does it. I could look at the source code, but I'm not too fluent in the language Nominatim is written.

(07 Feb '14, 02:09) baekacaek

@baekacaek: Indeed ... For whatever reason I missed the "How" while reading, sorry.

(07 Feb '14, 14:28) aseerel4c26 ♦
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: 06 Feb '14, 23:05

question was seen: 6,188 times

last updated: 07 Feb '14, 19:07

powered by OSQA