-
Notifications
You must be signed in to change notification settings - Fork 4
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
polygon_to_line
function not working if a GeoInterface Polygon has holes.
#201
Comments
I see. The implementation from ArchGDAL is buggy in that it does not recognize linear rings on output (though it does require them on input, as you saw). This probably needs an implementation of Thanks for the bug report! |
Why do you need polygons as linestrings, though? If it's just for plotting you can simply |
I am looking to get each edge line between pairs of polygon vertices (so I can see which polygon line segment is closest to a point). I used something similar to Note that I do also need the line segments from the holes in a polygon so I currently do Linestring(Point.()) separately for each linestring if the polygon has holes. |
Isn't Its also pretty wrong, this just can't work most of the time. First we should always return a GI.ngeom(poly) > 1 && return GI.MultiLineString(collect(GI.getgeom(poly))) Maybe... just maybe... |
I've realised for my use case I can use something like |
GI.getpoint will probably be more efficient than GI.coordinates, but otherwise yes! |
Yeah, never used |
I have run into an issue where
polygon_to_line
produces an error if a polygon has holes and has been created with GeoInterface methods. If the polygon originates from ArchGDAL creation thenpolygon_to_line
does work even if the polygon has holes.For context I found this issue as I have ArchGDAL polygons that are simplified with GO, and
polygon_to_line
works with these polygons (even if there are holes), however after usingGO.buffer
on these polygons an error is encountered if the polygon has holes.Below is example code:
Below is the error message encountered on line 22, and is the same error as the final line (my use case for context):
The text was updated successfully, but these errors were encountered: