locationtech / jts

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

GeometryFixer might change GeometryType to single instance #788

Closed FObermaier closed 2 years ago

FObermaier commented 2 years ago

When processing invalid multi geometries with GeometryFixer, the return value might change to its respective single instance geometry type.

To me this seems undesireable, especially when using data stores like e.g. PostGis, where you have to define a specific geometry type for a table's geometry colum.

I propose to add a boolean variable keepMulti along with a proper setKeepMulti(boolean) method and adjust the FixMultiXXX implementations accordingly.

https://github.com/NetTopologySuite/NetTopologySuite/issues/566

dr-jts commented 2 years ago

Sounds good to me.

dr-jts commented 2 years ago

Fixed by #791