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

Daniel Baston dbaston at gmail.com
Thu Mar 10 04:47:49 PST 2016


You're right, I didn't describe that well.  I should say instead that these
functions aren't using GEOS' behavior of cleaning up topological collapses
(GEOS_PREC_NO_TOPO and GEOS_PREC_KEEP_COLLAPSED in the CAPI).  GEOS is
indeed doing a pointwise precision reduction, which should be a no-op in my
use case but may not be in others.

Dan

On Thu, Mar 10, 2016 at 4:53 AM, Sandro Santilli <strk at keybit.net> wrote:

> 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;
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20160310/264eafe3/attachment.html>


More information about the postgis-devel mailing list