NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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

baekacaek
176121317
accept rate: 0%

edited 07 Feb '14, 00:18

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

Please avoid crosspostings as they consume a lot of the ressources that try to help you: https://stackoverflow.com/questions/21616476/how-does-reverse-geocoding-work

(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 ♦
82.5k927201273
accept rate: 23%

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 ♦
32.6k18248554
accept rate: 18%

1

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 ♦

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×689
×85

question asked: 06 Feb '14, 23:05

question was seen: 8,459 times

last updated: 07 Feb '14, 19:07

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum