]> granicus.if.org Git - postgis/commitdiff
Don't let a single collapse hide _all_ edges (#1650)
authorSandro Santilli <strk@keybit.net>
Tue, 6 Mar 2012 13:44:04 +0000 (13:44 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 6 Mar 2012 13:44:04 +0000 (13:44 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9408 b70326c6-7e19-0410-871a-916f4a2858ee

topology/sql/populate.sql.in.c
topology/test/regress/topogeo_addlinestring.sql
topology/test/regress/topogeo_addlinestring_expected

index 9c4206d5065760288b802d77ebd9ea1d74cdbfdd..a036b0f71e93b19cc5822f25e477e94fcc4d9a51 100644 (file)
@@ -935,7 +935,7 @@ BEGIN
 #ifdef POSTGIS_TOPOLOGY_DEBUG
       RAISE DEBUG 'Edge collapsed';
 #endif
-      RETURN;
+      CONTINUE;
     END IF;
 
     -- Check if the so-snapped edge _now_ exists
index 697079b598b5591383e3a06ffdf9b2cf2f1950a4..ebdfd9cc703c73a8d1d5179722651afd6f00d052 100644 (file)
@@ -184,6 +184,11 @@ SELECT '#1650.2' || TopoGeo_addLineString('city_data',
 , 2)::text;
 SELECT check_changes();
 
+SELECT '#1650.3', TopoGeo_addLineString('city_data',
+  'LINESTRING(-1 0, 10 0)'
+, 2) ORDER BY 2;
+SELECT check_changes();
+
 -- Cleanups
 DROP FUNCTION check_changes();
 SELECT DropTopology('city_data');
index 930ed795b4c52f9d385d94ecff2ce60d623c56aa..4d21f9b2d90b2c44b0329791582b112e51241e02 100644 (file)
@@ -146,4 +146,7 @@ E|64|sn62|en63
 E|65|sn63|en64
 #1650.1
 N|65|0|POINT(0 0)
+#1650.3|66
+N|66||POINT(10 0)
+E|66|sn65|en66
 Topology 'city_data' dropped