-
Notifications
You must be signed in to change notification settings - Fork 956
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
Replace jsts @turf/buffer #674
Conversation
turf-buffer add northern test polygon
This looks much better. Is there a version of the amended code that we can access for try-out? |
This code is still very much in prototype but if you really want to test it you can check out the Fingers crossed we'll be a bit closer in another week or two if you can hold on. |
OK - I'd best leave well alone until you're happy with the modifications. |
Like @rowanwins was saying, you can always try it out using the $ git clone git@github.com:Turfjs/turf.git -b replace-jsts-buffer However, there's still a few more things we need to work on before we merge this, so might be best to wait a until we officially release/merge this PR. Expect these changes to be in the next major release |
Having a really hard time using Going to close this PR since a lot of changes occurred in PR #718 |
Gday @DenisCarriere Just wondering on what the hard part is with |
Will attempt to use |
Hi all. Very glad that turf buffer is being incrementally improved. Good job with the reprojection @DenisCarriere - I'm glad the buffers are looking more natural now! I've just had some time to check out In testing it I also experienced it to be much slower in its current implementation as you pointed out, and showing some unpleasant artefacts near boundaries of complex polygons. I just wanted to point out that my one-year-old no-jsts pull request for turf-buffer is still online (is there a way to port it to the new, modular version of turf?). With the new reprojections taking up some additional computation time, I've found it to as performant as the current turf buffer, especially for small, everyday geojson features. Is there any interest in continuing from that PR? |
@mclaeysb porting over that PR would be difficult, might be better to dissect which component is actually improving the performance and simply add that. Buffer is such a complex operation that we should stick with existing libraries ( I don't think we should be adding all that extra logic in Also mixing different buffer libraries seemed to have backfired (ref: #786) |
@DenisCarriere Indeed, buffering and union/intersect/... are very complex and error-prone. Sticking with I just thought I'd mention that PR because 1) I thought removing PS: thanks for all the work you're putting into turf. PSS: your note on #786 gave me an insight on #801. Indeed proves that mixing libraries is tricky, especially on a sphere.. |
@mclaeysb correct me if I'm wrong, but I don't think ExamplesMultiPoint (using
|
Indeed! That's one of the things that should be implemented. Either by passing it through @turf-dissolve, or by implementing dissolving in its internal code (possibly within |
After adding |
Indeed, adding I don't wanted to push anything here, just wanted to point out its there if you'd want to look for alternatives. |
👍 OK thanks for the reference. |
2nd attempt to replace
jsts
from@turf/buffer
usingpolygon-offset
.To-Do
arcSegments
/steps
> 32Good 👍
jsts
jsts
🥇(jsts
breaks)Needs improvement 👎
arcSegments
> 32 (need to tests this behavior more).Neutral
jsts
.Benchmark Results
Example1 - Complex Multi-Polygon
Example1.a - Smooth edges (using
polygon-offset
)Example2 - With Holes
Ref: #656
CC: @rowanwins