[postgis-devel] Fixed precision for ST_Intersection, ST_Union, etc.

Sandro Santilli strk at keybit.net
Thu Mar 10 01:53:02 PST 2016


On Wed, Mar 09, 2016 at 07:20:57PM -0500, Daniel Baston wrote:

> Branch is at https://github.com/postgis/postgis/pull/100

> * GEOS provides the ability to reduce a geometry's precision, cleaning up
> topological collapses that may result from coordinate movement.  These
> functions don't take advantage of this behavior; they assume that the user
> is providing geometry whose coordinates are in fact precise at the level
> specified.  I do think there should be a separate ST_ReducePrecision to
> allow a user to take advantage of this feature.

As far as I know the only way to request use of fixed-precision
through the GEOS C-API is by invoking the function that does
encode the precision into the GEOS version of the geometry and at
the same time rounds its coordinates to it, so there should be
no way to report a precision assumption to GEOS (as of GEOS
trunk C-API).

How else did you implement the precision support, if not using
those functions (GEOSGeom_setPrecision_r) ?

--strk;



More information about the postgis-devel mailing list