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

I'm using the latitude/longitude argument to get the current town the user is in from nominatim, but sometimes when the user is on long roads that span multiple towns it gives a neighboring town instead of the town they are currently in. For example, the coordinates (41.036389, -74.031476) are clearly inside the borders of Park Ridge but nominatim says the nearest road, Kinderkamack Road, is located in Woodcliff Lake so the field that returns the town/city in nominatim says the user is in Woodcliff Lake instead of Park Ridge. Is there any way to accurately get the city/town the user is in with nominatim?

asked 19 Jun '16, 16:22

pdrum1030's gravatar image

pdrum1030
11113
accept rate: 0%

edited 19 Jun '16, 16:24


In the Nominatim database each street section (way) is linked to one parent only. During reverse geocoding it's not re-evaluated if the coordinate might be in a different parent (city). Setting &zoom=10 (city level) limits the output and takes shortcuts in the search logic but has the same behavior. If there were houses on that street or the street split at the city boundary the result would be better, I don't recommend changing OSM data over this though. Currently it's a limitation (bug) in Nominatim, in worst case if a street crosses country borders it even returns the wrong country.

permanent link

answered 19 Jun '16, 22:12

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

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
×163
×133
×26

question asked: 19 Jun '16, 16:22

question was seen: 3,032 times

last updated: 19 Jun '16, 22:12

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