[geos-devel] Exposing PrecisionModel, GeometryPrecisionReducer in the C API

Sandro Santilli strk at keybit.net
Wed Jan 7 04:19:10 PST 2015


On Wed, Jan 07, 2015 at 01:16:09PM +0100, Sandro Mani wrote:
> On 07.01.2015 13:09, Sandro Santilli wrote:
>
> >Changing the PrecisionModel of a Geometry is really needed
> >to change the behavior of GEOS operations themselves. This
> >is the kind of "exposure" I'd be interested to.
>
> Yes I agree.
>
> >Once you convert GEOS geometries to QgsGeometry you don't
> >really care about what PrecisionModel is recorded in them,
> >do you ?
>
> I'm not sure, what are the implications if a pass back a
> GEOSGeometry to QgsGeometry which has a fixed precision model, and
> not the double model as is default?

I don't know as I didn't read the QGIS code, but I know in PostGIS
we scan coordinates of each point and copy them so the input
PrecisionModel does not affect the conversion in any way.

Even if you used WKT, the worst that could happen is that
you'd get less decimal digits, but that's the real precision
of the input anyway, so nothing is lost.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html


More information about the geos-devel mailing list