[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha1-142-gf9db63e
git at osgeo.org
git at osgeo.org
Fri Jun 26 09:23:11 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 f9db63e9dc082534798861cdfed5c1429c36406f (commit)
from 2ce98e26bc76fc0ae615774c9d2adfa0a39df008 (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 f9db63e9dc082534798861cdfed5c1429c36406f
Author: Sandro Santilli <strk at kbt.io>
Date: Fri Jun 26 18:22:15 2020 +0200
Add test for handling of edge-linking topology corruption
References #4709
diff --git a/topology/test/regress/st_addedgemodface.sql b/topology/test/regress/st_addedgemodface.sql
index 3791480..b94beb8 100644
--- a/topology/test/regress/st_addedgemodface.sql
+++ b/topology/test/regress/st_addedgemodface.sql
@@ -520,6 +520,24 @@ SELECT f.id, r.element_type||':'||r.element_id as comp
SELECT 'F'||face_id, st_astext(mbr) FROM city_data.face ORDER BY face_id;
+-----------------------------------------------------
+-- Check robustness in presence of corrupted topology
+-----------------------------------------------------
+
+-- See https://trac.osgeo.org/postgis/ticket/4709
+BEGIN; -- need a transaction to corrupt the topology
+-- 1. Corrupt topology by setting edge 5 next_face_right = 999999 (instead of 5)
+UPDATE city_data.edge_data
+ SET
+ next_left_edge = 999999,
+ abs_next_left_edge = 999999
+ WHERE edge_id = 5; -- corrupt topology
+-- 2. Try to add an edge closing a ring involving edge 5
+-- 5 | POINT(36 38)
+-- 7 | POINT(41 40)
+SELECT ST_AddEdgeModFace('city_data', 5, 7, 'LINESTRING(36 38,41 40)');
+ROLLBACK; -- restores the topology
+
---------------------------------------------------------------------
-- Cleanups
---------------------------------------------------------------------
diff --git a/topology/test/regress/st_addedgemodface_expected b/topology/test/regress/st_addedgemodface_expected
index cfc96e0..55ccf03 100644
--- a/topology/test/regress/st_addedgemodface_expected
+++ b/topology/test/regress/st_addedgemodface_expected
@@ -206,4 +206,5 @@ F32|POLYGON((36 33,36 38,57 38,57 33,36 33))
F33|POLYGON((38 40,38 43,41 43,41 40,38 40))
F34|POLYGON((35 25,35 45,63 45,63 25,35 25))
F35|POLYGON((9 14,9 22,21 22,21 14,9 14))
+ERROR: Backend error (no ring edges for edge 58): Corrupted topology: ring of edge 58 is topologically non-closed
Topology 'city_data' dropped
-----------------------------------------------------------------------
Summary of changes:
topology/test/regress/st_addedgemodface.sql | 18 ++++++++++++++++++
topology/test/regress/st_addedgemodface_expected | 1 +
2 files changed, 19 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list