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
Error when MultiLineString degenerates into LineString #14
Comments
@mxwell Thanks for pointing that out! 👍 I'm just curious, considering the polygon's structure, is there a reason for using such a large border density value (i.e. 10)? Have you tried reducing this value? I'm asking because this library uses the This brings us to the problem at hand. Is this the result you were looking for? |
Sorry for late reply. Regarding my use case, this particular polygon is much smaller than others in the input and probably should be discarded by some kind of filter. But if I failed to filter it out or tune the density appropriately, then the single line will do. My point is that the program could either (a) produce warning about too large density, leading to degeneration of center line, or (b) raise an exception with the same message. Currently, the error initially looks like a bug in shapely, which doesn't help during troubleshooting. |
@mxwell I agree. I believe a P.S. The density of the Voronoi grid is inversely proportional to the border density value. |
For some inputs
_create_centerline()
returnsLineString
, which breaks MultiLineString constructor. Not sure, if that is so by design.Anyway, here is an example:
If you consider this an issue, I can provide PR.
Thanks.
The text was updated successfully, but these errors were encountered: