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
linestring.is_simple is wrong #768
Comments
@shankari green means only that the geometry is "valid", which is always the case for line strings. I suspect that your line really does self-intersect at some point, even if that is only due to floating point precision errors. It would probably be good to make linestrings red if they are not simple, yes? Instead of coloring based on is_valid. |
@sgillies I didn't even know that linestring color represented validity 😃 I just put that in to show that there are no self-intersections. As you can probably tell, that is a public transit line and when I display it on a map, I can zoom and pan. And I don't see any self-intersections or anything that might be close to a self-intersection. Is there a way I can determine the supposed intersection point so that I can check that location? |
You can compare the coordinates of the linestring pair-wise:
You have many duplicate coordinates, which is not allowed in the Simple Features specification. A possible automatic fix would |
@kannes thank you 🙏 |
Right back at you! Any time I file a bug report or voice a wish, I also look at issues to see if I can help, that's the spirit. |
Expected behavior and actual behavior.
My non-self-crossing line should return
is_simple
= TrueSteps to reproduce the problem.
Notes:
ls
and confirm that it is not self-crossing (see screenshot)Operating system
Mac OSX 10.14.5
Shapely version and provenance
Installed from conda-forge
The text was updated successfully, but these errors were encountered: