Skip to content
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

Open
ovdleondle opened this issue Nov 29, 2024 · 3 comments

Comments

@ovdleondle
Copy link

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
kinks would return a self-intersection at 0,1 coordinates, which is false.

@smallsaucepan
Copy link
Member

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?

@pm0u
Copy link
Contributor

pm0u commented Dec 17, 2024

this appears to be unrelated to #2722:

  • this module actually uses its own line-intersect algorithm
  • this module, per its description in jsdoc, is intended to report only self intersections

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

@smallsaucepan
Copy link
Member

Thanks for ruling that out @pm0u. Will take a closer look at this one in due course then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants