joto / osmium

C++/Javascript framework for working with OSM files.
http://wiki.openstreetmap.org/wiki/Osmium
GNU General Public License v3.0
123 stars 31 forks source link

Multipolygon: handling of closed touching inner rings #57

Open simon04 opened 11 years ago

simon04 commented 11 years ago

According to https://wiki.openstreetmap.org/wiki/Relation:multipolygon#Touching_inner_rings, touching inner rings may be used if the ways are closed.

Osmium, however, fails on such multipolygons, e.g., http://www.openstreetmap.org/browse/relation/1517038:

Building multipolygon based on relation 1517038 failed: invalid ring

joto commented 11 years ago

"fails on such multipolygons" is a bit of a generalization. Osmium works fine in all other "touching inner rings" cases that I have seen. But you are right, in this case it doesn't work. Geometry of the multipolygon looks fine, so this should work. So this is a bug that needs looking into.

simon04 commented 11 years ago

"fails on such multipolygons" is a bit of a generalization.

It wasn't meant as an insult of Osmium nor as overly generalization, but I experienced this behaviour on several multipolygons of this type in my region … :-)

joto commented 11 years ago

Can you give some more examples? Maybe we can figure out what they have in common and this way figure out where the problem might be.

simon04 commented 11 years ago

Those are the errors reported by the OSM Inspector as Multipolygon/Touching inner rings. All examples I've seen have at least two inner rings with a common way segment.