locationtech / jts

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

Fix ConvexHull to avoid modifying input #1083

Closed dr-jts closed 1 month ago

dr-jts commented 1 month ago

In some cases ConvexHull was modifying the input coordinate array by sorting it. This could happen on large nearly-linear geometries.

This fixes the issue by ensuring the sort is always done on a newly-allocated array.

Reported in #1082.