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

0
1

Hi, in my application, I get the latitude and longitude of my position. My position is always a road/street because I am in a car. When I have the latitude und longitude, I make a request to Nominatim, e.g.:

http://nominatim.openstreetmap.org/reverse?format=json&lat=LATITUDE&lon=LONGITUDE

If at my position is only a road, then the request works how I want the request to work: I get the street I am on. But if there is a building in the near of my position, I get the building instead of the street. I can't use the street of the building because it is important for me to get the right section of the road because I need the way id for a further request (e.g. speed limit on the street)

Is it possible to get just streets from Nominatim?

asked 08 Jun '17, 07:04

FM_Pete's gravatar image

FM_Pete
16235
accept rate: 0%


You can set zoom=16 to filter buildings/addresses/POIs.

permanent link

answered 08 Jun '17, 10:48

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

That does not solve my problem. I am not interested in e.g. buildings, I just need streets.

(08 Jun '17, 11:15) FM_Pete

Have you tried the parameter? Do you have an example where a building gets returned?

(08 Jun '17, 11:27) mtmail

I tried it with zoom=18, I get the building then. With zoom=16 and zoom=17 I get the street I need. But why? The only thing I found about the zoom parameter is following:

zoom=[0-18]

Level of detail required where 0 is country and 18 is house/building

Where can I see the difference between e.g. 16 and 18 or 16 and 17?

(08 Jun '17, 12:43) FM_Pete

You can test the zoom parameter on http://nominatim.openstreetmap.org/reverse.php?format=html&lat=35.144792512496686&lon=-90.00751018524171&zoom=16 The red circle is the search point (where you clicked on the map), the blue circle the result that got returned. A zoom=3 will return only the country, zoom=16 the street, zoom=18 the building (address, housenumber, POI) if found.

(08 Jun '17, 15:49) mtmail

Thanks for your help!

(08 Jun '17, 20:41) FM_Pete

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
×36
×8

question asked: 08 Jun '17, 07:04

question was seen: 8,965 times

last updated: 08 Jun '17, 20:41

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