I'd like to find ways that are members of more than one type=multipolygon relation with role "outer" with Overpass API as this often indicates errors/problems. I'm not sure how to approach this correctly. This is how far I got:
I start with multipolygon relations, look for their outer ways and try to find those ways parent relations where they have the role outer and look if there are more than one. Alternatively I could also start with ways, but I thought it might be good to restrict the input set more:
I was not able to find any results and once I got an out of memory error. Is this somehow correct what I'm trying to do? Is this even possible with Overpass API? asked 12 Mar '17, 21:35 nebulon42 |
I'm not sure it is the best way to do it, but one way to find them is to use a foreach statement to look through the relations one by one:
http://overpass-turbo.eu/s/nsO A slightly adjusted query eliminates the duplicates by collecting the found ways together in a set before outputting them:
answered 13 Mar '17, 15:57 maxerickson Thanks, it clearly works, so I accepted it as answer. But as alester has pointed out above I haven't formulated the problem well.
(13 Mar '17, 21:39)
nebulon42
|
I am not good with Overpass, but could write a little program to extract them from a planet file, if you are not getting any answers here. Just open an issue on https://github.com/osmlab/fixing-polygons-in-osm . answered 13 Mar '17, 10:34 Jochen Topf Thanks for the offer! This would be a possibility, but Overpass API has the advantage of minutely diffs that I can't easily setup for myself. This allows for some agile clean-up.
(13 Mar '17, 21:25)
nebulon42
|
If a way is on the shared boundary between adjoining multipolygons, wouldn't it correctly be an "outer" for both? It seems to me that this would be a common and very much correct situation, so I wouldn't say that it would "often indicate errors/problems".
Good point. I missed that. What I meant is that a closed way that is in more than one multipolygon with role outer would indicate a potential problem. For a non-closed way this would indeed be a valid and maybe common situation.