[postgis-devel] Precision Reduction?

Darafei "Komяpa" Praliaskouski me at komzpa.net
Tue Nov 10 23:03:36 PST 2020


I would like to get this exposed. I also would like it to be exposed in a
way that will get the SQL idiomatic.

What would be the usage scenario for precision values in the new GEOS?

I've recently seen a closed reimplementation of the concept of precision
inside to manage some data. They generally had a field next to geometry,
epsilon, and wrappers around all spatial relationship testers that buffered
the geometries before checking relationships. It got wild when both
geometries were passed with different precision.

What happens with GEOS overlays when two geoms are passed with different
precision, how does it work?

For other postgres types, numeric has precision encoded into the typmod. It
kind of makes sense for geometry too: you will get a whole table of
geometries snapped to the same precision and it will be snapped in
runtime, with you running the normal ST_Intersects/union/ on the geometries.

We have a tradition of encoding things we store in typmod into geometry
itself. Shall we put the precision on gserialized too?



On Wed, Nov 11, 2020 at 2:12 AM Paul Ramsey <pramsey at cleverelephant.ca>
wrote:

> One of the "new" GEOS 3.9 features is that
>
> GEOSGeom_setPrecision
>
> actually backs onto the OverlayNG precision reducer, so you can get valid
> precision reduced geometries out of it.
>
> Currently, nothing in PostGIS exposes this functionality (because prior to
> this the precision reducer in GEOS wasn't really any smarter than our own
> snap to grid).
>
> Should we be exposing this?
>
> Under what name?
>
> P
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



-- 
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20201111/b1cc8ff9/attachment.html>


More information about the postgis-devel mailing list