[Patch] Add GeometryPrecisionReducer to C API
|Reported by:||smani||Owned by:|
The attached patch adds methods for using the GeometryPrecisionReducer to the C API. I'm using these methods in QGIS to achieve better results when performing operations on geometries which occasionally suffer from precision issues.
Related to the subject: I noticed that geos::precision::GeometryPrecisionReducer::targetPM is a const-reference to a geos::geom::PrecisionModel. Unless there are specific reasons for this, API-wise it would probably be cleaner to just store a copy of the PrecisionModel (since it is a tiny class) - this is what one would most likely expect to happen when seeing the "const geom::PrecisionModel &pm" in the constructor signature.
As far as the patch is concerned, storing the targetPM as a copy would remove the need to keeping the GEOSPrecisionModel around.