]> granicus.if.org Git - postgis/commitdiff
Add tests for topology bug #1855
authorSandro Santilli <strk@kbt.io>
Sun, 22 Oct 2017 15:39:25 +0000 (15:39 +0000)
committerSandro Santilli <strk@kbt.io>
Sun, 22 Oct 2017 15:39:25 +0000 (15:39 +0000)
Previous commits fixes #1855 too

git-svn-id: http://svn.osgeo.org/postgis/trunk@16038 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/topogeo_addlinestring.sql
topology/test/regress/topogeo_addlinestring_expected
topology/test/regress/topogeo_addpolygon.sql
topology/test/regress/topogeo_addpolygon_expected

index 7833b94bbe12cc4b73b7165777f6dbd9a0d627e4..63d426168706c4758840258b65a569ea5a088e2c 100644 (file)
@@ -350,3 +350,18 @@ SELECT 't3838.L2', topology.TopoGeo_addLinestring('bug3838',
 'LINESTRING(622608 6554988, 622596 6554984)'
 ::geometry , 10);
 SELECT 't3838.end', topology.DropTopology('bug3838');
+
+-- See https://trac.osgeo.org/postgis/ticket/1855
+-- Simplified case 1
+SELECT 't1855_1.start', topology.CreateTopology('bug1855') > 0;
+SELECT 't1855_1.0', topology.TopoGeo_addLinestring('bug1855',
+  'LINESTRING(0 0, 10 0, 0 1)', 2);
+SELECT 't1855_1.end', topology.DropTopology('bug1855');
+-- Simplified case 2
+SELECT 't1855_2.start', topology.CreateTopology('bug1855') > 0;
+SELECT 't1855_2.0', topology.topogeo_AddLinestring('bug1855',
+  'LINESTRING(0 0, 0 100)');
+SELECT 't1855_2.1', topology.topogeo_AddLinestring('bug1855',
+  'LINESTRING(10 51, -100 50, 10 49)', 2);
+SELECT 't1855_2.end', topology.DropTopology('bug1855');
+
index 7d87a8384c5b63360f2a5668d7d163bbe86916c1..06a085401e64e48f0c3842ca540f2b57d5469d1b 100644 (file)
@@ -222,3 +222,12 @@ t3838.L2|8
 t3838.L2|9
 t3838.L2|2
 t3838.end|Topology 'bug3838' dropped
+t1855_1.start|t
+t1855_1.0|1
+t1855_1.end|Topology 'bug1855' dropped
+t1855_2.start|t
+t1855_2.0|1
+t1855_2.1|3
+t1855_2.1|5
+t1855_2.1|6
+t1855_2.end|Topology 'bug1855' dropped
index d93baf27ed16b04403b3f180be7da66148454827..36bc0dd856708e27ed1e05c8e23ed79eca0df2fb 100644 (file)
@@ -111,3 +111,18 @@ SELECT check_changes();
 DROP FUNCTION check_changes();
 SELECT DropTopology('city_data');
 
+-- See https://trac.osgeo.org/postgis/ticket/1855
+-- Original submission (more simplifications are
+-- in topogeo_addlinestring.sql)
+-- Original submission
+SELECT 't1855_0.start', topology.CreateTopology('bug1855', 0, 0.00001) > 0;
+SELECT 't1855_0.0', topology.TopoGeo_addPolygon('bug1855',
+        'POLYGON((76.26727 9.85751,76.29001 9.90026,
+                  76.29942 9.86257,76.26727 9.85751))'
+::geometry);
+SELECT 't1855_0.1', topology.TopoGeo_addPolygon('bug1855',
+'POLYGON((76.31988 9.89696,76.30482 9.88391,
+          76.2941 9.88391,76.29409 9.88391,76.29409 9.88392,
+          76.29001 9.90026,76.31988 9.89696))'
+::geometry);
+SELECT 't1855_0.end', topology.DropTopology('bug1855');
index f0059eb497b66ba3f568e3ac1c6ae40289d6d50d..6523adfaca157e9ceb0f832d7517be4eb3ec4a4c 100644 (file)
@@ -53,3 +53,7 @@ ex_hole_snap|13
 ex_hole_snap|14
 ex_hole_snap|15
 Topology 'city_data' dropped
+t1855_0.start|t
+t1855_0.0|1
+t1855_0.1|2
+t1855_0.end|Topology 'bug1855' dropped