[SCM] PostGIS branch master updated. 3.4.0rc1-1067-gc2931466d

git at osgeo.org git at osgeo.org
Mon Mar 25 11:21:36 PDT 2024


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  c2931466ddb2f3b7b9e7581561aa0c7c8391791f (commit)
      from  09270d595112341b94b899bd39390eccd7c0a972 (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 c2931466ddb2f3b7b9e7581561aa0c7c8391791f
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Mar 25 19:18:06 2024 +0100

    Simplify edge crossing validation by using boundary node rule
    
    Boundary node rule is available in GEOS since 3.3 while
    we require 3.8 or higher.

diff --git a/topology/sql/manage/ValidateTopology.sql.in b/topology/sql/manage/ValidateTopology.sql.in
index 3375fb006..df71b5690 100644
--- a/topology/sql/manage/ValidateTopology.sql.in
+++ b/topology/sql/manage/ValidateTopology.sql.in
@@ -747,7 +747,7 @@ BEGIN
       e2.edge_id as id2,
       e1.geom as g1,
       e2.geom as g2,
-      ST_Relate(e1.geom, e2.geom) as im
+      ST_Relate(e1.geom, e2.geom, 2) as im
     FROM
       edge e1,
       edge e2
@@ -771,51 +771,9 @@ BEGIN
       )
   LOOP --{
 
-    IF ST_RelateMatch(rec.im, 'FF1F**1*2') THEN
-      CONTINUE; -- no interior intersection
-
-    --
-    -- Closed lines have no boundary, so endpoint
-    -- intersection would be considered interior
-    -- See http://trac.osgeo.org/postgis/ticket/770
-    -- See also full explanation in topology.AddEdge
-    --
-
-    ELSIF ST_RelateMatch(rec.im, 'FF10F01F2') THEN
-      -- first line (g1) is open, second (g2) is closed
-      -- first boundary has puntual intersection with second interior
-      --
-      -- compute intersection, check it equals second endpoint
-      IF ST_Equals(ST_Intersection(rec.g2, rec.g1),
-                   ST_StartPoint(rec.g2))
-      THEN
-        CONTINUE;
-      END IF;
-
-    ELSIF ST_RelateMatch(rec.im, 'F01FFF102') THEN
-      -- second line (g2) is open, first (g1) is closed
-      -- second boundary has puntual intersection with first interior
-      --
-      -- compute intersection, check it equals first endpoint
-      IF ST_Equals(ST_Intersection(rec.g2, rec.g1),
-                   ST_StartPoint(rec.g1))
-      THEN
-        CONTINUE;
-      END IF;
-
-    ELSIF ST_RelateMatch(rec.im, '0F1FFF1F2') THEN
-      -- both lines are closed (boundary intersects nothing)
-      -- they have puntual intersection between interiors
-      --
-      -- compute intersection, check it's a single point
-      -- and equals first StartPoint _and_ second StartPoint
-      IF ST_Equals(ST_Intersection(rec.g1, rec.g2),
-                   ST_StartPoint(rec.g1)) AND
-         ST_Equals(ST_StartPoint(rec.g1), ST_StartPoint(rec.g2))
-      THEN
-        CONTINUE;
-      END IF;
-
+    IF ST_RelateMatch(rec.im, 'FF*F*****') THEN
+      -- no interior-interior or interior-boundary intersections
+      CONTINUE;
     END IF;
 
     retrec.error = 'edge crosses edge';

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

Summary of changes:
 topology/sql/manage/ValidateTopology.sql.in | 50 +++--------------------------
 1 file changed, 4 insertions(+), 46 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list