-
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
Rewrite line-intersect module #2033
Conversation
Any chance you can change this back to your npm sweeplines-intersections package and get it to pass the build that way like with point-in-polygon-hao? The lack of licensing header and babeled code breaking eslint makes me feel bad. |
@rowanwins I think the build will pass if you go back to depending on your npm package now that we started targeting es2017? We should also add that package name to https://github.com/Turfjs/turf/blob/master/README.md#browser-support |
* some cleanup * clarify Intersection type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one comment to remove geojson-rbush dep if no longer needed. approving otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome. Can you publish the typescript defs in the package itself? I made two PRs to accomplish this:
rowanwins/sweepline-intersections#12
#2274
I'm going to go ahead and merge this |
Hi quick question as this PR is merged but it's not released yet to npm. When and how is that gonna happen? |
@matthiasfeist +1 on your comment. I would love to see this being merged to npm, it would allow me to remove an intersection algorithm created as a workaround. |
I believe this PR introduced a breaking change that means that self intersections are checked by default where previously they were not checked at all / did not have the option to be checked. I believe this has further sweeping changes than just booleanIntersects. For instance, turf/packages/turf-boolean-crosses/index.ts Line 104 in 68915ee
|
Please fill in this template.
npm test
at the sub modules where changes have occurred.npm run lint
to ensure code style at the turf module level.This PR provides an overhaul of the
line-intersect
module primarily to make it more performant for larger geometries. The previous implementation used a fairly brute force approach while this PR make uses a sweepline.I did have to comment out one test for handling
GeometryCollection
as I couldn't make typescript happy.The benchmark shows the improvement, the only exception is the first case which i only a single segment.
Resolves #2024
Resolves #2029