-
Notifications
You must be signed in to change notification settings - Fork 942
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
Match @turf/line-overlap
based on proximity distance
#902
Conversation
@turf/line-overlap
based on proximity distance
@rowanwins @tremby Have a look at this PR, this seem to have solved both the simplified & the initial issue. Since the line segments might not be exactly on the target line, I added a @tremby I used Green: Results => overlapping lines |
@rowanwins Tried to use Is there anyway to add a distance parameter in your boolean module? Is that even possible? Nothing too complicated but having this would help a lot for this type of scenario. 👍 |
Looks like it does the trick; thank you! Lovely fast progress. |
You caught me at a "bored" moment, usually it's not this fast. Strange that the Travis CI keeps failing... 🤔 works fine locally. |
Questions about this fix:
|
Yes with 0 it does work on the simplified case (added
Pretty sure it's something like that, floating points, and when you dive down real close you can see that the points don't actually overlap but they cross each other, hence why we needed to add the It's a great example, I'm glad you brought it up!
Ops, this broke something in |
Gday @DenisCarriere Yep we should be able to add some sort of proximity parameter (I'd perhaps call it tolerance) similar to any of the other distance style params that we offer for other modules.
Will see if I can bash it out quickly this evening. |
Most of the "core" functionality can be copy-pasted from the internal methods, they aren't very big modules. Close to zero dependencies for the boolean modules would be ideal, obviously there's some that can't which is fine. |
Match
@turf/line-overlap
based on proximity distancePrimarily a fix for issue #901.
@turf/line-overlap
can now match lines within a proximity distance (in kilometers).JSDocs
To-Do's
segmentEach
to iterate over line segmentsAddtemporary fix usingunary-union
to both source & targetpoint-on-line
has been added untilunary-union
is completedSimplified example (no sharing nodes)