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

Hello! Im triying to get streets like unique element, but open street maps returns me the id of the chunk and a chunk that doesnt have a clearly relation between the other chunks of the same street and if i use the name like identifier sometimes in a small radius that name of street repeats and i cant get the street like an element. Any idea? thanks!

asked 29 Aug '19, 07:59

markvex's gravatar image

markvex
11113
accept rate: 0%

1

What are you trying to accomplish?

(29 Aug '19, 08:26) InsertUser

Get all the chunks of a street from a query. The only way i found was using the name of the street and a bounding box, but sometimes it returns two different near streets that are called equal...

(29 Aug '19, 08:35) markvex

What is "a street" to you? How do you define it? Is it just the having the same name, or exactly the same highway tag (look at some of the elements of https://overpass-turbo.eu/s/LUL for example). What about https://overpass-turbo.eu/s/LUM ? Is "High Street East" there part of the same street as "High Street" to the west? Is the pedestrian area to the west part of the same street?

(29 Aug '19, 10:30) SomeoneElse ♦

For me in that example that you gave me those are different elements /streets. I know that different chunks are necesary to label it with their own properties but in this case street is the same and one chunk doesnt have a relation to the others => "http://lz4.overpass-api.de/api/interpreter?data=[out:json];%20way[%27highway%27]%22name%22=%27Calle%20Lope%20de%20Vega%27;%20out;%20%3E;%20out%20skel%20qt;"

(29 Aug '19, 10:40) markvex

Can you link to that in OSM? Across the world there are many streets with that name: https://overpass-turbo.eu/s/LUO .

(29 Aug '19, 10:42) SomeoneElse ♦

Yes, and in 2km around as well...thats the problem why i cannot limit it. The thing is that actually the postman can deliver the package to the correct street because ZIP adds a unique id to differ one street to another with the same name but open street maps doesnt supply me anything to know we are talking about the same element

(29 Aug '19, 10:46) markvex

Can you link to the area that you are talking about in OSM? Without that, we've no idea where in the world you're talking about.

(29 Aug '19, 10:56) SomeoneElse ♦

Im talking in general to some cases for example in spain, most of the cities have that problem

(29 Aug '19, 11:05) markvex

Sounds like it's here

(29 Aug '19, 12:06) SomeoneElse ♦
showing 5 of 9 show 4 more comments

There is no ready-made API that would give you that. It is also often subject to interpretation, as a street could well have gaps in it where there's a small plaza or something - when is it still "the same street"? What you can do is download all the chunks and look at the node IDs at either end - if two chunks share a node id then they belong together. But even if you do that you will often not end up with a linear object since it is not unusual to have little stubs branching off that carry the same name as the main street...

permanent link

answered 29 Aug '19, 09:29

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

But nodes wont be shared so i can get a relation in there rigth?

(29 Aug '19, 09:38) markvex

Can you say this again, I don't understand where relations come into it.

(29 Aug '19, 09:40) Frederik Ramm ♦

I mean, i can check if some chunks are of the same street by the node id independently of the name they have edit: i have check that and its only usefull in cases where the street chunks are stick to the next, if there is something in the middle nodes doesnt relate...so..How get the whole street?

(29 Aug '19, 09:46) markvex
1

All streets are connected somehow. The node at the end of one street will be connected to another street, e.g. here: https://www.openstreetmap.org/node/17716584 so if you only check connectedness then all streets in the city are one!

(29 Aug '19, 09:58) Frederik Ramm ♦

Not always check "http://lz4.overpass-api.de/api/interpreter?data=[out:json];%20way[%27highway%27]%22name%22=%27Calle%20Lope%20de%20Vega%27;%20out;%20%3E;%20out%20skel%20qt;" One chunk of that street its not related to the others and its the same street

(29 Aug '19, 10:38) markvex
1

One chunk of that street its not related to the others and its the same street

Which actual street are you talking about?

(29 Aug '19, 11:15) SomeoneElse ♦

Calle Lope de Vega, León, España

(29 Aug '19, 11:52) markvex

If you're talking about this street, you can see that the last node of the way (594795551) is connected to another way with the same name.

(29 Aug '19, 16:53) alester

Although this has no name, it does have pieces named "Calle Lope de Vega" at each end. It's up to you whether you consider them all part of the "same street" or not - that's why I asked those questions in comments above.

(29 Aug '19, 21:33) SomeoneElse ♦
2

It would really help us if you can describe what goal you're trying to reach once you have this data.

(29 Aug '19, 23:28) alester
showing 5 of 10 show 5 more comments
Your answer
toggle preview

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:

×1
×1

question asked: 29 Aug '19, 07:59

question was seen: 974 times

last updated: 29 Aug '19, 23:28

Related questions

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