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

simplify: Visvalingam, by default, keeps 3 points for "areas" #140

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

paulmach
Copy link
Owner

@paulmach paulmach commented Jan 8, 2024

As described and requested in #124 by @albertyw this PR sets the "default min points" for the Visvalingam to:

  • 2 if a line, already the case
  • 3 for non-closed rings, rings/polygons, etc where the first point does not match the first, i.e. implicitly closed.
  • 4 for closed rings

This will give polygons completely simplified a non-zero area. This should help keep the geometry valid after simplification. Note that the simplification can still cause self-intersections.

@paulmach paulmach merged commit 132b19c into master Jan 11, 2024
2 checks passed
@paulmach paulmach deleted the simplify-min branch January 11, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant