This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to get OSM IDs by Nominatim?

0

For a local installation of the OSM and Nominatim databases, is there a way to get the OSM IDs of the individual address fields returned by a Nominatim query?

For example, when two queries return the same city name, is there a way to determine whether or not this is in fact the same city, rather than two cities with the same name?

An SQL select statement or a short "how to do this in SQL" would be very much appreciated. Thanks.

asked 24 Apr '17, 20:41

maxmeier12's gravatar image

maxmeier12
11112
accept rate: 0%

edited 10 Jan '18, 19:48

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

details.php from nominatim seems to have code doing this:

http://nominatim.openstreetmap.org/details.php?place_id=158768940

(The "Address" section lists several Paris entries mapping to different OSM objects)

(24 Apr '17, 21:26) maxerickson

Source code available on GitHub .