osm2geojson icon indicating copy to clipboard operation
osm2geojson copied to clipboard

Failed to convert MultiPolygon relation 'with more than one hole' to shape depending on shapely version

Open phersu42 opened this issue 11 months ago • 1 comments

Hello,

At first: thank you, your library is very useful!

Second: As mentioned in the title, my problem is that the conversion of MultiPolygons with more than one hole fails. I tried version 0.2.3, 0.2.4, 0.1.33 and 0.2.0. It seems that the problem depends on the shapely version, because it worked with osm2geojson v0.2.0 and shapely v2.0.3 but not with osm2geojson v0.2.4 and shapely v2.0.3 (I didn't try more combinations but maybe there are more) The problem might be related to #39.

The query I used: [out:json][timeout:1000];area["ISO3166-2"="SE-W"];(nwr['natural'='water'](area););out geom;

(My output was very long but similar to the output in #39 )

Do you have any recommendations how to use your library (e.g. combination of versions)? To chose the right version works for me but it feels a bit strange that it does not work "out of the box". Maybe I have overlooked something

phersu42 avatar Mar 25 '24 00:03 phersu42

https://github.com/aspectumapp/osm2geojson/issues/35 it could be another example of the same issue. Unfortunately, current algorithm could fail on some relations. The problem is if we will change that algorithm to support these relations - other places could break.

PS. It requires deep research of every example and how to find perfect algorithm which could satisfy all of them. And right now I don't have much time to do that.

rapkin avatar Apr 05 '24 13:04 rapkin