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

lineOverlap producing holes #1890

Open
sloreti opened this issue Apr 30, 2020 · 2 comments
Open

lineOverlap producing holes #1890

sloreti opened this issue Apr 30, 2020 · 2 comments

Comments

@sloreti
Copy link

sloreti commented Apr 30, 2020

Hey all,

I'm trying to use lineOverlap. I am comparing a candidateLine to a targetLine, and in this example the entirety of candidateLine should be overlapping targetLine (especially when tolerance: .1 is set). However, instead of getting back one LineString that captures the whole of candidateLine, I get back two LineStrings, with a big hole in the middle.

https://jsfiddle.net/vwh5z6sx/10/

(candidateLine and targetLine are commented out on L33 and L34, respectively)

Any assistance would be much appreciated and thank you for this great package!

@rowanwins rowanwins added the bug label May 2, 2020
@rowanwins
Copy link
Member

Looks like there is a bug - thanks for reporting @sloreti

Screen

@YousefED
Copy link

I noticed similar issues with lineOverlap.

For now using this as a workaround, maybe helpful for others:

turf.intersect(turf.buffer(lineStringA, tolerance/2), turf.buffer(lineStringB, tolerance/2);

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

4 participants