I have a following query build almost same as the example at : http://wiki.openstreetmap.org/wiki/Overpass_API It should return all town areas in the given box (second query) that are close to way from a first query, however it return a huuuge list of (?) random (?) towns and I don't know what's wrong <query type="way"> <bbox-query n="50.3651" s="50.3498" w="20.013" e="20.0468"/> <has-kv k="highway" v="primary"/> </query> <bbox-query n="50.3651" s="50.3498" w="20.013" e="20.0468"/> <query type="area"> <has-kv k="place" v="town"/> </query> <print/> asked 15 Jan '15, 17:37 huberttt Roland Olbricht |
Well, you can try and play around a bit with the following query: http://overpass-turbo.eu/s/734 - or - http://overpass-turbo.eu/s/735 (which includes highways on the map) It will return all town nodes up to 5000m distance to a highway=primary in your current bbox. answered 15 Jan '15, 18:28 mmd |
areas are only created for ways and relations, if they have a name (very broadly speaking). However, in your bbox, there's neither a way with place=town nor a relation with the same tagging. Only a single node, but for that one, there's no area as I mentioned.
Can you rephrase a bit what you're trying to do? I didn't quite get it from your question.
The following query would find all nodes with place=town up to 3km distance to your way. That's about the only information you would get in your bbox: http://overpass-turbo.eu/s/733
Ok, maybe my goal was a bit messy. What my point is: Supposed we have a road ( highway=primary) , I want to find all the towns near that road (within some radius maybe 100-400m)
Thank you, seems to work pretty nice, suffices. Regards
And just one more question, what if I would like to list all the cities like before but not in a box ? I'mean for all length of road?
The following query will check along ref=7 in Poland (according to the existing relation) - http://overpass-turbo.eu/s/739 ... Note that it takes several minutes to run this query.