-
Notifications
You must be signed in to change notification settings - Fork 341
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
Offset curve has Weird Geometry #897
Comments
Yes, looks fine to me. Large offsets are always going to be a bit weird, and you've got a 90 degree turn there that is way below the radius you are using, so... if you want to see "why", generate a bunch of curves starting with a small offset and working your way up. |
Yeah, interior corners are going to necessarily end up sharper than exterior ones... that's kind of the nature of the best, yeah? |
@MrShutCo what version of GEOS are you using? In GEOS 3.11 offsetting your input by 15 (using default cap and join, which I believe are CAP_ROUND and JOIN_ROUND) produces: |
@dr-jts My bad, I forgot that my code is negating the offset so its actually -15. But my version is 3.11.1, and I'm writing code in Go and using a C-wrapper that eventually calls a function called |
Running this in GEOS 3.11 (HEAD) with offset -15:
produces this:
I'm not sure why you're seeing a different result. If you are passing explicit CAP and JOIN parameters, perhaps that's causing a problem? Can you call the OffsetCurve routine with default parameters? What Go wrapper are you using? |
Aha... running via the C API produces what you are seeing:
More investigation required... |
Changed it to pass in just the default and it gives this: We're using a forked version of https://github.com/paulsmith/gogeos it seems, which looking at now I'm kinda surprised just how old it is lol. Although seeing that makes me think its on the geos side... |
Got it... it's a small bug in the C-API Will fix soon, and backport to 3.11. |
More weird offset curves here: qgis/QGIS#53165 (comment) |
References qgis/QGIS#53165 References libgeos#897
* References qgis/QGIS#53165 * References #897
* References qgis/QGIS#53165 * References #897
* References qgis/QGIS#53165 * References #897
Output of offsetting this curve by 15 with CAP_ROUND and JOIN_ROUND is unexpected
Which gives
And looks like
Is this expected behaviour?
The text was updated successfully, but these errors were encountered: