]> granicus.if.org Git - postgis/commitdiff
Don't consider the old self edge when checking integrity
authorSandro Santilli <strk@keybit.net>
Tue, 3 Jan 2012 09:49:54 +0000 (09:49 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 3 Jan 2012 09:49:54 +0000 (09:49 +0000)
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
topology/test/regress/st_changeedgegeom.sql
topology/test/regress/st_changeedgegeom_expected

index fda288e2419cc6303b78cbd1e0f7327643ae0172..25a123b5594f7a7479bdcd8f65653027e3fd6bbb 100644 (file)
@@ -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
 
index cc9a5ccfac98d808945ab06882530f4df6fca2cf..c0e2bcc57424f438c195fdd408fc434cf5b60d9b 100644 (file)
@@ -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
 
index 4fcedf1a55a86a5ce4940105e345a591734bf1a3..a6a94142ca72013c0cd10c415ade93249df677ac 100644 (file)
@@ -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