-
Notifications
You must be signed in to change notification settings - Fork 949
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
@turf/kinks returns false self-intersections in MultiLineString features with branches #2756
Comments
Thanks for reporting this @ovdleondle. Could it possibly be related to #2722? Would you mind checking to see if the behaviour is correct for v6.5.0? |
this appears to be unrelated to #2722:
i am not sure that this qualifies as a bug per the documentation within turf but i could be missing some context for what would be expected of a module by this name. this case seems to be behaving as expected just by appearance |
Thanks for ruling that out @pm0u. Will take a closer look at this one in due course then. |
@smallsaucepan I confirm that this behavior is not related to #2722, as the same issue occurs in version 6.5.0. After reviewing the kinks documentation, I also agree with @pm0u that the module is technically functioning as intended. Our goal was to use the
Additionally, geometry validation in PostGIS evaluates whether a geometry is simple and whether it is valid:
To summarize, we plan to use the kinks module exclusively for polygon and multipolygon features. For lines, we will try using lineIntersect with |
turf 7.1.0
When a MultiLineString feature has branches (e.g. a river with tributaries, or a street with side streets), kinks module returns self-intersection at the branching point.
For this geojson feature:
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"MultiLineString","coordinates":[[[0,0],[0,1],[0,2]],[[0,1],[1,1]]]}}]}
kinks would return a self-intersection at 0,1 coordinates, which is false.
The text was updated successfully, but these errors were encountered: