-
Notifications
You must be signed in to change notification settings - Fork 372
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
BufferOp / Offset Curve producing additional points #507
Comments
This is a ... not a "bug" necessarily but a "deficiency" in the offset curve algorithm as it currently exists. @dr-jts is re-working offset curve generation so that in 3.11 we should have something that is more "rational" across all cases.
In the meantime, you might find that adding a very small amount of randomness to your inputs before generating the offset curve has an effect. Basically you're seeing that the existing approach is kind of brittle in how it selects edges to add to the curve, and just "shaking things around" a little can change the outputs. This is a long-winded way to say "we are not going to fix the current implementation in 3.10 and earlier" because we're getting a fresh one in 3.11. |
See also #477 |
Thanks for the quick response :) |
About 10 months, we're on an annual cadence. New implementation of offset curves could be much sooner, so you could run off main as necessary. |
great, thanks for your help and good luck with it all! |
The OffsetCurve code has landed in JTS (locationtech/jts#810), and should be in GEOS soon. As shown below, it doesn't have the issue of additional lines at the end. However, currently it only supports a round join type. Is the mitred join type shown in the SO images important? I'm not sure how feasible it will be to support mitred joins in the new code base. |
Oh great news. |
This should be fixed by #530. Are you able to verify? |
Hi Martin, I've just given this a try but it seems to produce the same issue.
Edit: It's worth pointing out, I'm using the c api |
Can you paste your program into GH here? Can't be very long, right? :) |
Good, this is what I wondered. Reporter's env is probably still linking old library somewhere. The new code is in 'main' so you don't need to pull the old working branch. |
You solved it! There were some old files which weren't removed correctly. I've now pulled the main branch and it seems to have resolved the issue. Appreciate the help and great work! |
After producing an offset curve from a set of points, an additional 2 points are created at the beginning and end of the offset curve.
I recently added a question to stack overflow, it's probably better to just link that as there are images, an explanation and my code also:
Link to Stack Overflow
I'm unsure if this is something I have coded incorrectly or whether it is a bug within the geos?
Thanks in advance,
Max
The text was updated successfully, but these errors were encountered: