Hi, Im trying to find a way of highlighting a particular site using the manual selector bbox and then getting the text data of just either the road names or the building names within that boundary. I'm a complete novice so any help would be greatly appreciated . Jason asked 11 Dec '15, 16:49 Jason HH |
I didn't know a way to get this data straight away as a file with just the names. But then @mmd corrected my example on how to get all the named roads within a bounding box. If you run his variant, you get a clean CSV file straight away. Only thing left to do is remove duplicates. The query was generated with the wizard you see at the top of the screen. I only wrote: highway= and name= . For buildings, you would just need to change highway to building. answered 11 Dec '15, 20:54 joost schouppe Thanks @mmd ! Updated my answer to include your example.
(11 Dec '15, 21:08)
joost schouppe
1
Just updated the example, we don't want to get any names of the ways' nodes.
(11 Dec '15, 21:12)
mmd
Thanks so much for taking the time to answer that is such a great help, it really is fantastic. Just on the off chance that you've time to look is there also a way to run the same for the building names, and the borough / county names, or perhaps a way to do all three at that same time in one list.
(12 Dec '15, 15:47)
Jason HH
And rob you of a nice learning opportunity? :) To get named buildings is terribly easy. Look at the code, it won't bite. The part that says way["highway"]["name"] asks the system for everything that is a way and has both a name and a highway tag. For buildings, all you would need to do is replace highway with building. One other thing to do, would be to include an extra line which says relation instead of way. Why? In the Openstreetmap universe, a closed way (end point is the same as beginning point of the line) is a polygon. And most builings are 'normal' polygons. But if you want to exclude a bit within this polygon, mostly for inner courtyards, the data needs to explain that one line is the outside of the building, and the other the inside. Relations do just this.
(13 Dec '15, 12:10)
joost schouppe
1
For neighborhoods and the like, there is a nice user interface around: https://wambachers-osm.website/boundaries/ You can drill down to the region you need, then right click to get all its "children". Shapefile export includes a DBF file with names.
(13 Dec '15, 12:14)
joost schouppe
2
Something that might be of use too, is to look for streets within a neighborhood instead of within a bounding box. This query http://overpass-turbo.eu/s/df9 will return all the named roads that have at least one node within the village of Zwalm. But if you need to be sure of getting the correct result (i.e. looking for Rome, U.S.A instead of Rome, Italy), you can include some information to limit results. For example, looking up Zwalm in OSM http://www.openstreetmap.org/relation/416206 I find that it is a level 8 administrative relation. So this query is more likely to turn up exactly what we need: http://overpass-turbo.eu/s/dfa
(13 Dec '15, 12:32)
joost schouppe
Thanks again for your help. Its certainly a steep learning curve!
(14 Dec '15, 09:29)
Jason HH
showing 5 of 8
show 3 more comments
|