[geos-devel] [GEOS] #713: [Patch] Add GeometryPrecisionReducer to C API

GEOS geos-trac at osgeo.org
Wed Sep 30 11:14:00 PDT 2015

#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  |  Resolution:
 Keywords:              |

Comment (by strk):

 From what I can tell the C++ API is wider than the one you exposed to C.
 For example it has two kind of construction for the
 GeometryPrecisionReducer class. One takes a PrecisionModel, and the other
 takes a GeometryFactory. The one taking a GeometryFactory will store the
 GeometryFactory reference in the output Geometry, effectively making it
 "tagged" as having the target "Precision", the other (the only you expose
 to C) will just use the given PrecisionModel as a grid to reduce
 coordinates to, but the output geometry will not be different from before.

 If what I described above is confirmed, the same thing could be exposed as
 a simple "GEOSGeometry_snapToGrid(<some_grid_config>)" function, with no
 need to expose a PrecisionModel _at_all_. This is surely not what I had in
 mind when thinking about exposing the PrecisionModel.

 And I'd also argue that adding a dependency on GEOS-C++ library to QGIS
 for just snapping to a grid is probably overkill.

Ticket URL: <https://trac.osgeo.org/geos/ticket/713#comment:8>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).

More information about the geos-devel mailing list