You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build polygons from a list of vertices. However, there seems no S2Builder port to pywraps2. How can we build polygons effectively using the Python port?
I've actually tried to build it with S2Loop and S2Polygon,
The problem is that S2Loop requires a lot of checking, like edges not intersecting each other. And right now there are no easy ways for me to ensure the input (list of vertices) would not cross with each other (the input is from a concave hull calculation), so I often ran into errors like ERROR Edge 46 crosses edge 48.
Are there any effective ways to build polygons in Python given the circumstance above?
Thanks a lot,
Foxan
The text was updated successfully, but these errors were encountered:
It seems like your concave hull function shouldn't be outputting intersecting edges. Maybe just look at edges 46, 48, and the ones around there and see what's going on.
If that doesn't show you the problem, did you try SWIG wrapping the S2Builder functions you need? I'm not exactly sure what SWIG will do with the unique_ptrs, so it might take some fiddling.
Hi there,
I'm trying to build polygons from a list of vertices. However, there seems no S2Builder port to pywraps2. How can we build polygons effectively using the Python port?
I've actually tried to build it with S2Loop and S2Polygon,
The problem is that S2Loop requires a lot of checking, like edges not intersecting each other. And right now there are no easy ways for me to ensure the input (list of vertices) would not cross with each other (the input is from a concave hull calculation), so I often ran into errors like
ERROR Edge 46 crosses edge 48
.Are there any effective ways to build polygons in Python given the circumstance above?
Thanks a lot,
Foxan
The text was updated successfully, but these errors were encountered: