Hi to all, I'm an OSM newbie. I'm looking for an Overpass QL query to retrieve, given a railway in a bounding box, all the roads that are within X meters (for example 50 m) from that. I've tried to search but I was not able to find a solution for this problem. Can someone help me to extract this info? Thanks! 4liX |
In the OSM wiki there is a documentation of the parameter "around" ... have you tried this? Please tell us success or failure, including your query string. answered 19 Nov '13, 16:21 stephan75 Thanks a lot guys! :-) I tried before posting with around command but clearly I made some mistakes. The query string is (here the link):
But I noticed that not all ways in the range are included (a example of way excluded). Is there a way to include also these cases? Indeed I'm interested in excluding all the roads that cross the railroad (maybe with difference statement) and find the towns/city to which the result set of ways belongs. Is that possibile? The last question (I promise :-) ): given a street far within 50 meters from a railway found with the overpass ql query before, there is a way to calculate the minimum distance from the rail? Thanks!
(24 Nov '13, 17:42)
4lix
Concerning the missing example: Please add "|service" to the highway list. Other variants may be missing, depending on what you want to do with the roads (finding brigdes, finding ways allowed for cars/bicycles/pedestrians or whatever).
(27 Nov '13, 08:54)
Roland Olbricht
1
A difference statement could use "(around:0)": see http://overpass-turbo.eu/s/1Cu I have also added "service" in this case and repeated the bounding box to speed up the whole query (For full exactness, the bounding box must be slightly expanded, but I neglected that).
(27 Nov '13, 09:00)
Roland Olbricht
1
For the last question: See http://overpass-turbo.eu/s/1Cv This executes for each way an area query such that in the output the areas this way belongs to are listed.
(27 Nov '13, 09:02)
Roland Olbricht
|
I am not sure you will find any answers to your problem/question in Overpass QL, at least not in "around". The referred documentation explicitly states "...get all nodes in the closer environment of one or more given nodes..." where the "closer environment" is a circular area defined by a given radius. Therefore many exceptions in generalisation as you have mentioned in you railway - streets example. answered 25 Nov '13, 12:34 sanser |