[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-5-gdcfb125

git at osgeo.org git at osgeo.org
Thu Jul 23 05:39:58 PDT 2020


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  dcfb1258c15c1e72efe4204183087b036c75a4e7 (commit)
      from  cf4979411652d6f9e60f37ebe071d5994eb5c155 (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 dcfb1258c15c1e72efe4204183087b036c75a4e7
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Jul 23 14:37:15 2020 +0200

    Re-enable tests for corrupted topology handling
    
    References #4706

diff --git a/topology/test/regress/st_changeedgegeom.sql b/topology/test/regress/st_changeedgegeom.sql
index 17b5172..b86aab2 100644
--- a/topology/test/regress/st_changeedgegeom.sql
+++ b/topology/test/regress/st_changeedgegeom.sql
@@ -136,15 +136,24 @@ SELECT 'T13.3', TopoGeo_AddPoint('city_data', 'POINT(-1.1697 47.7825)'::geometry
 SELECT 'T13.4', ST_ChangeEdgeGeom('city_data', 29, '01020000001D000000E42CEC69873FF2BF9E98F56228E347400EDB16653648F2BF4985B18520E34740E92B4833164DF2BF3A1E335019E34740A94D9CDCEF50F2BF33F9669B1BE347407DAEB6627F59F2BF2CF180B229E34740758E01D9EB5DF2BFD0D556EC2FE34740533F6F2A5261F2BFD717096D39E34740F4893C49BA66F2BFC8073D9B55E34740B8239C16BC68F2BF33A7CB6262E34740AA2B9FE57970F2BF4165FCFB8CE347406DC5FEB27B72F2BFBA4E232D95E34740978BF84ECC7AF2BF24EEB1F4A1E34740E527D53E1D8FF2BF8F8D40BCAEE3474036CD3B4ED191F2BF649291B3B0E34740841266DAFE95F2BF1DE6CB0BB0E34740E3361AC05BA0F2BFB2632310AFE347405C5A0D897BACF2BF72F90FE9B7E3474031D3F6AFACB4F2BF4F232D95B7E347402B137EA99FB7F2BFD656EC2FBBE347402D431CEBE2B6F2BF551344DD07E4474011E4A08499B6F2BF15E3FC4D28E447406519E25817B7F2BF63EE5A423EE447409DD7D825AAB7F2BFE3FC4D2844E447405969520ABABDF2BF2384471B47E44740A31EA2D11DC4F2BFB1F9B83654E447400473F4F8BDCDF2BFEA5BE67459E447405070B1A206D3F2BFF19D98F562E4474062670A9DD7D8F2BF0E4FAF9465E447407FF6234564D8F2BFF1BA7EC16EE4474
 0' );
 
 -- See https://trac.osgeo.org/postgis/ticket/4706
--- TODO: Put back after the tests are fixed error on 32bit OS
--- 1. Corrupt topology by setting edge 19 face_right = 3 (instead of 4)
--- UPDATE city_data.edge_data SET right_face = 3 WHERE edge_id = 19; -- corrupt topology
--- 2. Try to change the edge of a face with no bbox
--- SELECT ST_ChangeEdgeGeom('city_data', 7, 'LINESTRING(21 22,28 20,35 22)' );
--- 3. Restore topology
--- UPDATE city_data.edge_data SET right_face = 4 WHERE edge_id = 19; -- restore topology
-
--- TODO: test changing some clockwise closed edges..
+DO $$
+BEGIN
+  -- 1. corrupt topology
+  UPDATE city_data.edge_data SET right_face = 3 WHERE edge_id = 19;
+  -- 2. Try to change the edge of a face with no bbox
+  BEGIN
+    SELECT ST_ChangeEdgeGeom('city_data', 7, 'LINESTRING(21 22,28 20,35 22)' );
+  EXCEPTION
+  WHEN OTHERS THEN
+    -- Strip details, we only want the first part
+    RAISE EXCEPTION '%', regexp_replace(SQLERRM, '([^:]): .*', '\1 (see #4706)');
+  END;
+END;
+$$ LANGUAGE 'plpgsql';
+
+--
+---- TODO: test changing some clockwise closed edges..
+--
 
 SELECT topology.DropTopology('city_data');
 
diff --git a/topology/test/regress/st_changeedgegeom_expected b/topology/test/regress/st_changeedgegeom_expected
index 155f1b8..d9e9d2f 100644
--- a/topology/test/regress/st_changeedgegeom_expected
+++ b/topology/test/regress/st_changeedgegeom_expected
@@ -39,4 +39,5 @@ T13.1|29
 T13.2|Edge 29 changed
 T13.3|26
 ERROR:  Edge motion collision at POINT(-1.1697 47.7825)
+ERROR:  Corrupted topology (see #4706)
 Topology 'city_data' dropped

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

Summary of changes:
 topology/test/regress/st_changeedgegeom.sql      | 27 ++++++++++++++++--------
 topology/test/regress/st_changeedgegeom_expected |  1 +
 2 files changed, 19 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list