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

Overpass QL: get entire street (way) of location.

0

Hi,

With the help of this forum I found a way to retrieve the street that belongs to a specific lat/lon. I use the following code:

<osm-script output="json">
  <query type="way">
    <around lat="52.15809830545579" lon="6.402184798522356" radius="10"/>
    <has-kv k="highway" modv="" v=""/>
  </query>
  <union>
    <item/>
    <recurse type="down"/>
  </union>
  <print/>
</osm-script>

This Overpass query has got two downfalls. Not always the entire street is shown, enlarging the raduis will select more of the current street, but also results in other streets in the dataset.

What do I need to change to always get one entire street (way), even if the way is for example 1000 km long?

Anyone an idea?

asked 03 Nov '21, 22:38

Arjan's gravatar image

Arjan
11111
accept rate: 0%

Looks like I found a solution, but I don't get it to work? https://github.com/drolbr/Overpass-API/issues/95#issuecomment-291252449

(09 Feb '22, 12:48) Arjan

Source code available on GitHub .