[SCM] PostGIS branch master updated. 3.6.0rc2-150-gd1f4deb9b

git at osgeo.org git at osgeo.org
Sun Oct 19 10:21:12 PDT 2025


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  d1f4deb9be180aec802c09f795dc7d2135d6436f (commit)
      from  0f533d759b306f058e867e603314542471579faf (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 d1f4deb9be180aec802c09f795dc7d2135d6436f
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Sun Oct 19 10:21:09 2025 -0700

    Improve doc for ST_CoverageClean

diff --git a/doc/html/images/Makefile.in b/doc/html/images/Makefile.in
index a0cb8de14..233b1fa6d 100644
--- a/doc/html/images/Makefile.in
+++ b/doc/html/images/Makefile.in
@@ -103,6 +103,9 @@ GENERATED_IMAGES= \
 	st_concavehull03.png \
 	st_concavehull04.png \
 	st_convexhull01.png \
+	st_coverageclean01.png \
+	st_coverageclean02.png \
+	st_coverageclean03.png \
 	st_coverageinvalidedges01.png \
 	st_coveragesimplify01.png \
 	st_coveragesimplify02.png \
diff --git a/doc/html/images/wkt/st_coverageclean01.wkt b/doc/html/images/wkt/st_coverageclean01.wkt
new file mode 100644
index 000000000..65b98e825
--- /dev/null
+++ b/doc/html/images/wkt/st_coverageclean01.wkt
@@ -0,0 +1,2 @@
+ArgA;GEOMETRYCOLLECTION (POLYGON ((10 190, 30 160, 27 134.5, 40 110, 122 47, 120 10, 10 10, 10 190)), POLYGON ((150 190, 10 190, 30 160, 50 140, 40 110, 50 80, 130 70, 135 111, 140 130, 140 160, 150 190)), POLYGON ((140 190, 190 190, 190 80, 140 80, 140 190)), POLYGON ((190 10, 120 10, 97 77, 160 90, 170 70, 190 80, 190 10)))
+
diff --git a/doc/html/images/wkt/st_coverageclean02.wkt b/doc/html/images/wkt/st_coverageclean02.wkt
new file mode 100644
index 000000000..fddb46e75
--- /dev/null
+++ b/doc/html/images/wkt/st_coverageclean02.wkt
@@ -0,0 +1,3 @@
+ArgA;GEOMETRYCOLLECTION (POLYGON ((10 190, 30 160, 27 134.5, 40 110, 122 47, 120 10, 10 10, 10 190)), POLYGON ((150 190, 10 190, 30 160, 50 140, 40 110, 50 80, 130 70, 135 111, 140 130, 140 160, 150 190)), POLYGON ((140 190, 190 190, 190 80, 140 80, 140 190)), POLYGON ((190 10, 120 10, 97 77, 160 90, 170 70, 190 80, 190 10)))
+Result-endpoints;GEOMETRYCOLLECTION (LINESTRING (40 110, 122 47, 120 10), LINESTRING (40 110, 50 80, 130 70, 135 111, 140 130, 140 160, 150 190, 10 190), LINESTRING (190 80, 140 80, 140 190, 190 190), LINESTRING (120 10, 97 77, 160 90, 170 70))
+
diff --git a/doc/html/images/wkt/st_coverageclean03.wkt b/doc/html/images/wkt/st_coverageclean03.wkt
new file mode 100644
index 000000000..d8ba84b46
--- /dev/null
+++ b/doc/html/images/wkt/st_coverageclean03.wkt
@@ -0,0 +1,2 @@
+ArgB;GEOMETRYCOLLECTION (POLYGON ((10 10, 10 190, 30 160, 27 134.5, 40 110, 84.69194312796209 75.66350710900474, 98.03118908382066 73.99610136452242, 102.03213844252163 62.341161928306555, 120 10, 10 10)), POLYGON ((140 130, 140 85.87301587301587, 131.7275615567911 84.16600476568705, 97 77, 98.03118908382066 73.99610136452242, 84.69194312796209 75.66350710900474, 40 110, 50 140, 30 160, 10 190, 140 190, 140 160, 140 130)), POLYGON ((140 160, 140 190, 150 190, 190 190, 190 80, 165 80, 140 80, 140 85.87301587301587, 140 130, 140 160)), POLYGON ((140 85.87301587301587, 140 80, 165 80, 190 80, 190 10, 120 10, 102.03213844252163 62.341161928306555, 98.03118908382066 73.99610136452242, 97 77, 131.7275615567911 84.16600476568705, 140 85.87301587301587)))
+
diff --git a/doc/reference_coverage.xml b/doc/reference_coverage.xml
index 5906b40a4..d00788df2 100644
--- a/doc/reference_coverage.xml
+++ b/doc/reference_coverage.xml
@@ -142,14 +142,23 @@ SELECT true = ALL (
     <refsection>
       <title>Description</title>
 
-      <para>A window function which adjusts the edges of a polygonal dataset to ensure that none of the polygons overlap, narrow gaps are removed, and shared edges are identically noded. 
-      The result is a clean coverage that will pass validation by <xref linkend="ST_CoverageInvalidEdges"/>
-      and can be input to coverage processing functions.
+      <para>A window function which adjusts the edges of a set of valid polygonal geometries to produce a clean coverage.
+      Cleaning involves:
       </para>
-      <para><parameter>gapMaximumWidth</parameter> controls the cleaning of gaps between polygons. Gaps with width less than this distance are merged into an adjacent polygon.</para>
-      <para><parameter>snappingDistance</parameter> controls snapping of close vertices and edges. The default setting (-1) use an automatic snapping distance based on the input. Set to 0.0 to turn off snapping.</para>
-      <para><parameter>overlapMergeStrategy</parameter> specifies how overlapping areas are merged into an adjacent polygon:</para>
-
+      <itemizedlist>
+        <listitem><para>
+            snapping vertices and edges to remove small discrepancies and ensure common edges are identically noded
+            </para></listitem>
+        <listitem><para>
+            merging overlaps into a parent polygon
+            </para></listitem>
+        <listitem><para>
+            merging narrow gaps into adjacent polygons
+            </para></listitem>
+      </itemizedlist>      
+      <para><parameter>gapMaximumWidth</parameter> controls which gaps between polygons are merged. Gaps with width <= this distance are merged into an adjacent polygon.</para>
+      <para><parameter>snappingDistance</parameter> controls snapping of vertices and edges. The default (-1) automatically determines a snapping distance based on the input extent. Set to 0.0 to turn off snapping.</para>
+      <para><parameter>overlapMergeStrategy</parameter> specifies how overlaps are merged into a parent polygon:</para>
       <itemizedlist>
         <listitem><para>
             <code>MERGE_LONGEST_BORDER</code> - merges into polygon with longest common border
@@ -164,6 +173,18 @@ SELECT true = ALL (
             <code>MERGE_MIN_INDEX</code> - merges into polygon with smallest input index (defined by order of input polygons)
             </para></listitem>
       </itemizedlist>      
+      <para>The result is a clean polygonal coverage that will pass validation by <xref linkend="ST_CoverageInvalidEdges"/>
+      and can be input to coverage processing functions.
+      </para>
+
+      <note>To aid in determining a maximum gap width,
+      gaps can be computed by cleaning with <code>gapMaximumWidth => 0</code> 
+      and using <xref linkend="ST_CoverageUnion"/> to union the result coverage. 
+      Holes in the union correspond to gaps in the original dataset.
+      Gap widths can be measured by extracting the holes as polygons 
+      and running <xref linkend="ST_MaximumInscribedCircle"/>
+      on them; the gap width is twice the computed radius.
+      </note>
 
       <para role="availability" conformance="3.6.0">Availability: 3.6.0 - requires GEOS >= 3.14.0</para>
     </refsection>
@@ -171,27 +192,53 @@ SELECT true = ALL (
     <refsection>
       <title>Examples</title>
 
-      <programlisting>-- Populate demo table
+      <programlisting>-- Populate input table
 CREATE TABLE example AS SELECT * FROM (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),
+  (1, 'POLYGON ((10 190, 30 160, 27 134.5, 40 110, 122 47, 120 10, 10 10, 10 190))'::geometry),
+  (2, 'POLYGON ((150 190, 10 190, 30 160, 50 140, 40 110, 50 80, 130 70, 135 111, 140 130, 140 160, 150 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)
+  (4, 'POLYGON ((190 10, 120 10, 97 77, 160 90, 170 70, 190 80, 190 10))'::geometry)
 ) AS v(id, geom);
+</programlisting>
 
--- Prove it is a dirty coverage
+      <informalfigure>
+        <mediaobject>
+            <imageobject>
+            <imagedata fileref="images/st_coverageclean01.png"/>
+            </imageobject>
+            <caption><para>Polygons with overlaps and gaps</para></caption>
+        </mediaobject>
+      </informalfigure>
+
+<programlisting>-- Show it is an invalid coverage
 SELECT ST_AsText(ST_CoverageInvalidEdges(geom) OVER ())
   FROM example;
+</programlisting>
 
--- Clean the coverage
+      <informalfigure>
+        <mediaobject>
+            <imageobject>
+            <imagedata fileref="images/st_coverageclean02.png"/>
+            </imageobject>
+            <caption><para>Invalid coverage edges</para></caption>
+        </mediaobject>
+      </informalfigure>
+
+<programlisting>-- Clean the coverage, merging gaps with width <= 1
 CREATE TABLE example_clean AS
-  SELECT id, ST_CoverageClean(geom) OVER () AS GEOM
+  SELECT id, ST_CoverageClean(geom, 1) OVER () AS GEOM
   FROM example;
+</programlisting>
+
+      <informalfigure>
+        <mediaobject>
+            <imageobject>
+            <imagedata fileref="images/st_coverageclean03.png"/>
+            </imageobject>
+            <caption><para>Clean polygonal coverage, with overlaps and narrow gaps removed</para></caption>
+        </mediaobject>
+      </informalfigure>
 
--- Prove it is a clean coverage
-SELECT ST_AsText(ST_CoverageInvalidEdges(geom) OVER ())
-  FROM example_clean;
-      </programlisting>
     </refsection>
 
     <refsection>

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

Summary of changes:
 doc/html/images/Makefile.in                |  3 ++
 doc/html/images/wkt/st_coverageclean01.wkt |  2 +
 doc/html/images/wkt/st_coverageclean02.wkt |  3 ++
 doc/html/images/wkt/st_coverageclean03.wkt |  2 +
 doc/reference_coverage.xml                 | 87 +++++++++++++++++++++++-------
 5 files changed, 77 insertions(+), 20 deletions(-)
 create mode 100644 doc/html/images/wkt/st_coverageclean01.wkt
 create mode 100644 doc/html/images/wkt/st_coverageclean02.wkt
 create mode 100644 doc/html/images/wkt/st_coverageclean03.wkt


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list