[postgis-devel] Fixed precision for ST_Intersection, ST_Union, etc.
Mike Toews
mwtoews at gmail.com
Wed Mar 9 17:28:39 PST 2016
On 10 March 2016 at 13:20, Daniel Baston <dbaston at gmail.com> wrote:
> I do think there should be a separate ST_ReducePrecision to
> allow a user to take advantage of this feature.
Hi Dan,
This last idea sounds very much like ST_SnapToGrid, which also
considers to remove (or not) coordinates within the precision of the
grid based on the geometry type, e.g.:
SELECT ST_AsText(ST_SnapToGrid(ls, 1.0)),
ST_AsText(ST_SnapToGrid(ST_Points(ls), 1.0))
FROM ST_GeomFromText('LINESTRING(0 0, 0.1 0.1, 1 1)') ls;
-[ RECORD 1 ]----------------------
st_astext | LINESTRING(0 0,1 1)
st_astext | MULTIPOINT(0 0,0 0,1 1)
-Mike
More information about the postgis-devel
mailing list