Closed albertyw closed 7 months ago
Considering this more, I see that Visvalingam may be applied to LineStrings and other types which may have no expectation of a non-zero area or more than 2 unique points. Similar to the discussion in #45, perhaps that indicates there should be no minimum number of points (other than the minimum of 2 points being the organic result of applying the algorithm) and users may need to instead specify number of points explicitly. I'm no expert in geojson so I'd be happy to discuss approaches.
this pr https://github.com/paulmach/orb/pull/140 updated "zero min points" to mean
I think that was the intention by this change.
Currently the
VisvalingamThreshold
simplification allows polygons to be simplified to 2 points which, at 0 area, is likely not the intention of the user nor does it produce a polygon that follows the geojson standard (#45). This changes the default to 3 points minimum.Visvalingam
andVisvalingamKeep
will still allow users to explicitly specify 0, 1, or 2 points minimum if actually desired.