-
Notifications
You must be signed in to change notification settings - Fork 944
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
lineSplit seems unable to handle splitter points with nearly the same longitude #1075
Comments
@haoliangyu See PR #1078 |
This definitely caused some issue 👍 thanks for reporting this. |
@DenisCarriere Thanks for the quick fix! In your PR, moving the point on the line is mentioned as a fixture. Can I consider it as a reliable way to avoid this issue for now and use |
👍 Yep that might be a good idea to use as the splitter since the Going to close this issue, however feel free to re-open or submit more fixtures that are failing. |
I run into an edge case where two points with nearly the same longitude breaks
lineSplit()
(in turf v4.7.3). The coordinates are collected via GPS and the longitude difference is only 0.000001. You can see the geometry in this Gist.When I try to split a line with these two points,
they break
lineSplit()
and throw an error.The problem is likely caused by the difference in the last decimal. It will work if I drop the 6th decimal or change the number to enlarge the difference. But I am not sure whether that is the correct way to avoid or fix the problem.
The text was updated successfully, but these errors were encountered: