locationtech / jts

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

BufferInputLineSimplifier doesn't simplify end segments of rings #1019

Closed dr-jts closed 10 months ago

dr-jts commented 10 months ago

This issue was revealed by https://github.com/libgeos/geos/issues/995. It has an example geometry with a very short initial segment, which isn't removed by simplification:

POLYGON ((4.6664239253667485 4.9470840685113275, 4.666423925366749 4.947084068511328, 3.569508914897422 -10.739531408188364, -9.082056557097435 19.893317266250286, 5.639581102785941 18.86388007810711, 4.6664239253667485 4.9470840685113275))

Although that PR has a fix for the problem caused by the very short segment. it would be nice to remove the segment altogether using BufferInputLineSimplifier. This requires that rings be flagged as requiring all segments to be considered for simplification.