Skip to content
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

OffsetCurve does not handle repeated points #957

Closed
dr-jts opened this issue Feb 23, 2023 · 0 comments · Fixed by #956
Closed

OffsetCurve does not handle repeated points #957

dr-jts opened this issue Feb 23, 2023 · 0 comments · Fixed by #956

Comments

@dr-jts
Copy link
Contributor

dr-jts commented Feb 23, 2023

The OffsetCurve class does not handle linework with repeated points correctly. This is due to the raw offset curve generator not handling repeated points correctly. The fix is simply to remove repeated points before generating the raw curve.

Example

Input with repeated point at (9 5):

LINESTRING (4 9, 1 2, 9 5, 9 5, 4 9)

The result for offset distance = 1 is:

image

if the repeated point is removed, the result is correct:
image

Originally reported in qgis/QGIS#51750.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants