[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-75-g639b2f9
git at osgeo.org
git at osgeo.org
Fri Feb 12 12:24:47 PST 2021
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 639b2f9bc23836b5c32cf68c4375a7cca5df6325 (commit)
from 14256dc9cc83d23578ba1016eaadda4297ccb9ed (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 639b2f9bc23836b5c32cf68c4375a7cca5df6325
Author: Martin Davis <mtnclimb at gmail.com>
Date: Fri Feb 12 12:24:35 2021 -0800
Add doc ST_ReducePrecision examples
diff --git a/doc/reference_processing.xml b/doc/reference_processing.xml
index 00a489c..2284c95 100644
--- a/doc/reference_processing.xml
+++ b/doc/reference_processing.xml
@@ -1980,11 +1980,25 @@ SELECT ST_AsText(ST_ReducePrecision('POINT(1.412 19.323)', 1.0));
-------------
POINT(1 19)
- SELECT ST_AsText(ST_ReducePrecision('POINT(1.412 19.323)', 10));
+SELECT ST_AsText(ST_ReducePrecision('POINT(1.412 19.323)', 10));
st_astext
-------------
POINT(0 20)
</programlisting>
+
+<para>Precision reduction can reduce number of vertices</para>
+<programlisting>SELECT ST_AsText(ST_ReducePrecision('LINESTRING (10 10, 19.6 30.1, 20 30, 20.3 30, 40 40)', 1));
+ st_astext
+-------------
+ LINESTRING (10 10, 20 30, 40 40)
+</programlisting>
+
+<para>Precision reduction splits polygons if needed to ensure validity</para>
+<programlisting>SELECT ST_AsText(ST_ReducePrecision('POLYGON ((10 10, 60 60.1, 70 30, 40 40, 50 10, 10 10))', 10));
+ st_astext
+-------------
+ MULTIPOLYGON (((60 60, 70 30, 40 40, 60 60)), ((40 40, 50 10, 10 10, 40 40)))
+</programlisting>
</refsection>
<refsection>
-----------------------------------------------------------------------
Summary of changes:
doc/reference_processing.xml | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list