paulmach / orb

Types and utilities for working with 2d geometry in Golang
MIT License
886 stars 103 forks source link

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

Closed paulmach closed 7 months ago

paulmach commented 8 months ago

As described and requested in https://github.com/paulmach/orb/pull/124 by @albertyw this PR sets the "default min points" for the Visvalingam to:

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.