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

how to differentiate between ST.PETERSBURG in Russia and USA.

1

how to differentiate between ST.PETERSBURG in Russia and USA, I just want to use the name.

asked 21 Jul '16, 17:00

srikanth18's gravatar image

srikanth18
26112
accept rate: 0%

about which website/service/whatever is your question? What are you using and doing?

(21 Jul '16, 20:56) aseerel4c26 ♦

One Answer:

2

The response from Nominatim has the importance field - essentially the "bigger" the place, the higher it scores. The Russian Petersburg is rated higher than the others.

Also, if you're expecting results to come primarily from a specific area, you set the viewbox request field; or even set bounded=1 if you only want your results to come from the viewbox area.

As for detecting "which of the Petersburgs is where": you can check the coordinates, which is not very precise.

Alternatively, you can pass the request field addressdetails=1, which will give you a hierarchy - checking the address.country_code might be sufficient here.

See the documentation at http://wiki.openstreetmap.org/wiki/Nominatim for more options.

answered 21 Jul '16, 17:10

Piskvor's gravatar image

Piskvor
1.3k91535
accept rate: 37%

edited 21 Jul '16, 17:11