From 07dc8f9946e2811d33f38bcad2316c3336a59dc6 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 3 Jan 2012 09:49:54 +0000 Subject: [PATCH] Don't consider the old self edge when checking integrity Fixes a bug introduced by previous commit. git-svn-id: http://svn.osgeo.org/postgis/trunk@8649 b70326c6-7e19-0410-871a-916f4a2858ee --- topology/sql/sqlmm.sql | 2 +- topology/test/regress/st_changeedgegeom.sql | 4 ++++ topology/test/regress/st_changeedgegeom_expected | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/topology/sql/sqlmm.sql b/topology/sql/sqlmm.sql index fda288e24..25a123b55 100644 --- a/topology/sql/sqlmm.sql +++ b/topology/sql/sqlmm.sql @@ -2509,7 +2509,7 @@ BEGIN || quote_literal(acurve::text) || '::geometry, 2) as im FROM ' || quote_ident(atopology) - || '.edge_data WHERE geom && ' + || '.edge_data WHERE edge_id != ' || anedge || ' AND geom && ' || quote_literal(acurve::text) || '::geometry' LOOP diff --git a/topology/test/regress/st_changeedgegeom.sql b/topology/test/regress/st_changeedgegeom.sql index cc9a5ccfa..c0e2bcc57 100644 --- a/topology/test/regress/st_changeedgegeom.sql +++ b/topology/test/regress/st_changeedgegeom.sql @@ -29,6 +29,10 @@ SELECT topology.ST_ChangeEdgeGeom('city_data', 25, SELECT topology.ST_ChangeEdgeGeom('city_data', 5, 'LINESTRING(41 40, 57 33)'); +-- Change to edge crossing old self +SELECT topology.ST_ChangeEdgeGeom('city_data', 5, + 'LINESTRING(41 40, 49 40, 49 34, 57 33)'); + -- TODO: test changing closed edge -- TODO: test reverse direction of closed edge diff --git a/topology/test/regress/st_changeedgegeom_expected b/topology/test/regress/st_changeedgegeom_expected index 4fcedf1a5..a6a94142c 100644 --- a/topology/test/regress/st_changeedgegeom_expected +++ b/topology/test/regress/st_changeedgegeom_expected @@ -11,4 +11,5 @@ ERROR: SQL/MM Spatial exception - geometry crosses a node ERROR: SQL/MM Spatial exception - non-existent edge 666 ERROR: SQL/MM Spatial exception - geometry crosses an edge Edge 5 changed +Edge 5 changed Topology 'city_data' dropped -- 2.40.0