]> granicus.if.org Git - postgis/commitdiff
Add another test for topology.AddFace in presence of an open edge whose endpoints...
authorSandro Santilli <strk@keybit.net>
Tue, 29 Mar 2011 13:57:01 +0000 (13:57 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 29 Mar 2011 13:57:01 +0000 (13:57 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6987 b70326c6-7e19-0410-871a-916f4a2858ee

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

index c1fea2646e404cc9c665d7a2ac65dee6632f7f7a..0099bdc75ff7890432caa47760aed48e1e9456bc 100644 (file)
@@ -112,3 +112,38 @@ SELECT face_id, Box2d(mbr) from t2.face ORDER by face_id;
 SELECT edge_id, left_face, right_face from t2.edge ORDER by edge_id;
 
 SELECT topology.DropTopology('t2');
+
+--
+-- Test edge touching face ring on both endpoints but not covered
+-- (E1 with F1)
+--
+--         
+--   N2 +-------.
+--      |\  F1  |
+--   E1 | \     | E3
+--      |F2\    |
+--      |  /    |
+--      | /E2   |
+--      |/      |
+--   N1 +-------'
+-- 
+SELECT topology.CreateTopology('t3') > 0;
+
+SELECT 't3.e1',  topology.addEdge('t3', 'LINESTRING(0 0, 0 10)');
+SELECT 't3.e2',  topology.addEdge('t3', 'LINESTRING(0 10, 5 5, 0 0)');
+SELECT 't3.e3',  topology.addEdge('t3', 'LINESTRING(0 10, 10 10, 10 0, 0 0)');
+
+-- Register F1
+SELECT 't3.f1',  topology.addFace('t3',
+'POLYGON((5 5, 0 10, 10 10, 10 0, 0 0, 5 5))');
+
+-- Register F2
+SELECT 't3.f2',  topology.addFace('t3', 'POLYGON((0 0, 5 5, 0 10, 0 0))');
+
+-- Check added faces
+SELECT face_id, Box2d(mbr) from t3.face ORDER by face_id;
+
+-- Check linking
+SELECT edge_id, left_face, right_face from t3.edge ORDER by edge_id;
+
+SELECT topology.DropTopology('t3');
index 4961e730174a8fd5fa94bf835a8285af9f4e6cbc..aa5445f206131b1979eeae04e0ad6c9b7b479d26 100644 (file)
@@ -83,3 +83,20 @@ ERROR:  Polygon boundary is not fully defined by existing edges at or near point
 10|5|2
 11|2|5
 Topology 't2' dropped
+t
+t3.e1|1
+t3.e2|2
+t3.e3|3
+WARNING:  Not checking if face contains any edge
+WARNING:  Not updating next_{left,right}_face fields of face boundary edges
+t3.f1|1
+WARNING:  Not checking if face contains any edge
+WARNING:  Not updating next_{left,right}_face fields of face boundary edges
+t3.f2|2
+0|
+1|BOX(0 0,10 10)
+2|BOX(0 0,5 10)
+1|0|2
+2|1|2
+3|0|1
+Topology 't3' dropped