locationtech / jts

The JTS Topology Suite is a Java library for creating and manipulating vector geometry.
Other
1.98k stars 443 forks source link

Add Polygonal Coverage simplification #911

Closed dr-jts closed 2 years ago

dr-jts commented 2 years ago

Adds the CoverageSimplifier class to the coverage package. This supports simplification of the edges of polygonal coverages while preserving the coverage topology:

The simplification uses an approach equivalent to Visvalingam-Whyatt simplification. This is based on removing vertices which are the apex of low-area "corners". The amount of simplification is determined by a tolerance value which is the square root of the maximum corner area that can be removed.

Simplification of France regions, tolerance = 0.2 image

The simplifier supports an option to simplify only the inner (non-boundary) edges of the coverage. This allows simplifying portions of a large coverage, and ensuring the simplified result fits seamlessly with the original.

Inner Simplification of France regions, tolerance = 0.2 image