[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-1116-g9f102e750

git at osgeo.org git at osgeo.org
Tue Jul 4 12:57:04 PDT 2023


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  9f102e75070a764f0e245b3b508e5869a1a9e286 (commit)
      from  96c3997dd2dfe53f26261b9214b9c1ca2f899eaa (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 9f102e75070a764f0e245b3b508e5869a1a9e286
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Tue Jul 4 12:57:02 2023 -0700

    Add doc ST_CoverageInvalid diagram

diff --git a/doc/html/images/Makefile.in b/doc/html/images/Makefile.in
index 610b24d0d..c258318d7 100644
--- a/doc/html/images/Makefile.in
+++ b/doc/html/images/Makefile.in
@@ -77,6 +77,7 @@ GENERATED_IMAGES= \
 	st_concavehull03.png \
 	st_concavehull04.png \
 	st_convexhull01.png \
+	st_coverageinvalidlocations01.png \
 	st_coveragesimplify01.png \
 	st_coveragesimplify02.png \
 	st_coverageunion01.png \
diff --git a/doc/html/images/wkt/st_coverageinvalidlocations01.wkt b/doc/html/images/wkt/st_coverageinvalidlocations01.wkt
new file mode 100644
index 000000000..fbd480ccd
--- /dev/null
+++ b/doc/html/images/wkt/st_coverageinvalidlocations01.wkt
@@ -0,0 +1,2 @@
+ArgA;GEOMETRYCOLLECTION (POLYGON ((10 190, 30 160, 40 110, 100 70, 120 10, 10 10, 10 190)), POLYGON ((100 190, 10 190, 30 160, 40 110, 50 80, 74 110.5, 100 130, 140 120, 140 160, 100 190)), POLYGON ((140 190, 190 190, 190 80, 140 80, 140 190)), POLYGON ((180 40, 120 10, 100 70, 140 80, 190 80, 180 40)))
+Result-endpoints;GEOMETRYCOLLECTION (LINESTRING (40 110, 100 70), MULTILINESTRING ((100 130, 140 120, 140 160, 100 190), (40 110, 50 80, 74 110.5)), LINESTRING (140 80, 140 190))
diff --git a/doc/reference_coverage.xml b/doc/reference_coverage.xml
index a9889f35d..2bddc3b64 100644
--- a/doc/reference_coverage.xml
+++ b/doc/reference_coverage.xml
@@ -32,10 +32,10 @@
     <refsection>
       <title>Description</title>
 
-      <para>Checks if the polygons in the window partition form a valid polygonal coverage,
-      and returns linear indicators showing the location of invalid edges (if any) in each polygon.
+      <para>A window function which checks if the polygons in the window partition form a valid polygonal coverage.
+      It returns linear indicators showing the location of invalid edges (if any) in each polygon.
       </para>
-      <para>A set of polygons is a valid coverage if the following conditions hold:
+      <para>A set of valid polygons is a valid coverage if the following conditions hold:
         </para>
 
       <itemizedlist>
@@ -49,7 +49,7 @@
 
       <para>As a window function a value is returned for every input polygon.
       For polygons which violate one or more of the validity conditions the return value is a MULTILINESTRING containing the problematic edges.
-      Valid polygons return the value NULL.
+      Coverage-valid polygons return the value NULL.
       Non-polygonal or empty geometries also produce NULL values.</para>
 
       <para>The conditions allow a valid coverage to contain holes (gaps between polygons),
@@ -59,30 +59,43 @@
       edges forming narrower gaps will also be returned as invalid.
       </para>
 
+      <para>The polygons being checked for coverage validity must also be valid geometries.
+      This can be checked with <xref linkend="ST_IsValid" />.
+      </para>
+
       <para role="availability" conformance="3.4.0">Availability: 3.4.0 - requires GEOS >= 3.12.0</para>
     </refsection>
 
     <refsection>
       <title>Examples</title>
 
-      <programlisting>CREATE TABLE coverage (id integer, geom geometry);
-
-INSERT INTO coverage VALUES
-  (1, 'POLYGON((0 0, 10 0, 10.1 5, 10 10, 0 10, 0 0))'),
-  (2, 'POLYGON((10 0, 20 0, 20 10, 10 10, 10.05 5, 10 0))'),
-  (3, 'POLYGON((20 0, 30 0, 30 10, 20 10, 20 0))');
+        <informalfigure>
+          <mediaobject>
+              <imageobject>
+              <imagedata fileref="images/st_coverageinvalidlocations01.png" />
+              </imageobject>
+              <caption><para>Invalid edges caused by overlap and non-matching vertices</para></caption>
+          </mediaobject>
+        </informalfigure>
 
+      <programlisting>WITH coverage(id, geom) AS (VALUES
+  (1, 'POLYGON ((10 190, 30 160, 40 110, 100 70, 120 10, 10 10, 10 190))'::geometry),
+  (2, 'POLYGON ((100 190, 10 190, 30 160, 40 110, 50 80, 74 110.5, 100 130, 140 120, 140 160, 100 190))'::geometry),
+  (3, 'POLYGON ((140 190, 190 190, 190 80, 140 80, 140 190))'::geometry),
+  (4, 'POLYGON ((180 40, 120 10, 100 70, 140 80, 190 80, 180 40))'::geometry)
+)
 SELECT id, ST_AsText(ST_CoverageInvalidLocations(geom) OVER ())
   FROM coverage;
 
- id |           st_astext
-----+--------------------------------
-  1 | LINESTRING(10 0,10.1 5,10 10)
-  2 | LINESTRING(10 10,10.05 5,10 0)
-  3 |
+ id |               st_astext
+----+---------------------------------------
+  1 | LINESTRING (40 110, 100 70)
+  2 | MULTILINESTRING ((100 130, 140 120, 140 160, 100 190), (40 110, 50 80, 74 110.5))
+  3 | LINESTRING (140 80, 140 190)
+  3 | null
       </programlisting>
 
-      <programlisting>-- Test entire table for validity
+      <programlisting>-- Test entire table for coverage validity
 SELECT true = ALL (
     SELECT ST_CoverageInvalidLocations(geom) OVER () IS NULL
     FROM coverage
@@ -93,6 +106,7 @@ SELECT true = ALL (
     <refsection>
       <title>See Also</title>
       <para>
+        <xref linkend="ST_IsValid" />,
         <xref linkend="ST_CoverageUnion" />,
         <xref linkend="ST_CoverageSimplify" />
       </para>

-----------------------------------------------------------------------

Summary of changes:
 doc/html/images/Makefile.in                        |  1 +
 .../images/wkt/st_coverageinvalidlocations01.wkt   |  2 +
 doc/reference_coverage.xml                         | 46 ++++++++++++++--------
 3 files changed, 33 insertions(+), 16 deletions(-)
 create mode 100644 doc/html/images/wkt/st_coverageinvalidlocations01.wkt


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list