Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
phersu42 opened this issue Mar 25, 2024 · 1 comment

Comments

@phersu42
Copy link

phersu42 commented Mar 25, 2024

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

@rapkin
Copy link
Collaborator

rapkin commented Apr 5, 2024

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants