]> granicus.if.org Git - postgis/commitdiff
Add regress test for topology.AddFace robustness (see #1383)
authorSandro Santilli <strk@keybit.net>
Thu, 12 Jan 2012 17:41:17 +0000 (17:41 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 12 Jan 2012 17:41:17 +0000 (17:41 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8791 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/addface.sql
topology/test/regress/addface_expected

index c74c81f6b76ffda9c2712ee2f12f3c7085d3d8ee..f17ea74e30c633df89789514cdd1ccae9451aa42 100644 (file)
@@ -192,5 +192,23 @@ SELECT '#1302', 'F' || topology.addFace('tt', '0103000000010000000500000000917E9
 
 SELECT '#1302', 'E' || edge_id, 'L' || left_face, 'R' || right_face FROM tt.edge_data ORDER BY edge_id;
 
-SELECT topology.DropTopology('tt');
+SELECT '#1302', topology.DropTopology('tt');
+-- }
+
+--
+-- Test face ring with endpoint matching edge endpoint
+-- and tricky numbers (see #1383)
+-- {
+--
+SELECT '#1383', CreateTopology('tt') > 0;
+
+SELECT '#1383', 'E' || addEdge('tt', 'LINESTRING(-0.1 -10, -0.2 0)');
+SELECT '#1383', 'E' || addEdge('tt', 'LINESTRING(-0.2 0, -1e-8 0)');
+SELECT '#1383', 'E' || addEdge('tt', 'LINESTRING(-1e-8 0, 1 0, -0.1 -10)');
+
+SELECT '#1383', 'F' || addFace('tt', 'POLYGON((-1e-8 0, 1 0, -0.1 -10, -0.2 0, -0.2 0, -1e-8 0))');
+
+SELECT '#1383', 'E' || edge_id, 'L' || left_face, 'R' || right_face FROM tt.edge_data ORDER BY edge_id;
+
+SELECT '#1383', DropTopology('tt');
 -- }
index aaaf1045549ffc837a21a331440cbc0d83ed6e1a..d266ffe2a94815b23034035801a753604f8e3d02 100644 (file)
@@ -123,4 +123,13 @@ Topology 't4' dropped
 #1302|F1
 #1302|E1|L0|R1
 #1302|E2|L0|R1
-Topology 'tt' dropped
+#1302|Topology 'tt' dropped
+#1383|t
+#1383|E1
+#1383|E2
+#1383|E3
+#1383|F1
+#1383|E1|L0|R1
+#1383|E2|L0|R1
+#1383|E3|L0|R1
+#1383|Topology 'tt' dropped