From 2aa8da7e1f135ff5d359a06fede332df37c0d46a Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 6 Mar 2012 13:44:04 +0000 Subject: [PATCH] Don't let a single collapse hide _all_ edges (#1650) git-svn-id: http://svn.osgeo.org/postgis/trunk@9408 b70326c6-7e19-0410-871a-916f4a2858ee --- topology/sql/populate.sql.in.c | 2 +- topology/test/regress/topogeo_addlinestring.sql | 5 +++++ topology/test/regress/topogeo_addlinestring_expected | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/topology/sql/populate.sql.in.c b/topology/sql/populate.sql.in.c index 9c4206d50..a036b0f71 100644 --- a/topology/sql/populate.sql.in.c +++ b/topology/sql/populate.sql.in.c @@ -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 diff --git a/topology/test/regress/topogeo_addlinestring.sql b/topology/test/regress/topogeo_addlinestring.sql index 697079b59..ebdfd9cc7 100644 --- a/topology/test/regress/topogeo_addlinestring.sql +++ b/topology/test/regress/topogeo_addlinestring.sql @@ -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'); diff --git a/topology/test/regress/topogeo_addlinestring_expected b/topology/test/regress/topogeo_addlinestring_expected index 930ed795b..4d21f9b2d 100644 --- a/topology/test/regress/topogeo_addlinestring_expected +++ b/topology/test/regress/topogeo_addlinestring_expected @@ -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 -- 2.40.0