[geos-devel] [GEOS] #713: [Patch] Add GeometryPrecisionReducer to C API
GEOS
geos-trac at osgeo.org
Mon Dec 8 10:08:41 PST 2014
#713: [Patch] Add GeometryPrecisionReducer to C API
------------------------+---------------------------------------------------
Reporter: smani | Owner: geos-devel@…
Type: defect | Status: new
Priority: major | Milestone: 3.4.3
Component: Default | Version: 3.4.2
Severity: Unassigned | Keywords:
------------------------+---------------------------------------------------
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.
--
Ticket URL: <http://trac.osgeo.org/geos/ticket/713>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
More information about the geos-devel
mailing list