]> granicus.if.org Git - postgis/commitdiff
More test for update of isolated nodes in split-faces.
authorSandro Santilli <strk@keybit.net>
Fri, 27 Jan 2012 11:36:58 +0000 (11:36 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 27 Jan 2012 11:36:58 +0000 (11:36 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8943 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/st_addedgemodface.sql
topology/test/regress/st_addedgemodface_expected
topology/test/regress/st_addedgenewfaces.sql
topology/test/regress/st_addedgenewfaces_expected

index 8d3b172f9ca3fb5b3060d398e866c9440baef2a1..0199e0f343f8b5e4d50c4fad3113ecfb26ea154e 100644 (file)
@@ -342,7 +342,11 @@ SELECT 'T21', 'E'||edge_id, next_left_edge, next_right_edge,
 
 --
 -- Split a face containing an hole 
+-- Faces on both sides contain isolated nodes.
 --
+SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 23, 'POINT(26 36)'), 23;
+SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 23, 'POINT(26 34.5)'), 23;
+SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 23, 'POINT(26 33)'), 23;
 INSERT INTO newedge SELECT 22, topology.st_addedgemodface('city_data',
   3, 3,  'LINESTRING(25 35, 27 35, 26 34, 25 35)');
 SELECT 'T22', 'E'||edge_id, next_left_edge, next_right_edge,
@@ -351,14 +355,14 @@ SELECT 'T22', 'E'||edge_id, next_left_edge, next_right_edge,
     SELECT edge_id FROM newedge WHERE id IN (22, 16)
     UNION VALUES (2),(3) )
   ORDER BY edge_id;
+SELECT 'T22', 'N' || node_id, containing_face FROM
+  city_data.node WHERE node_id IN ( 27, 28, 29 )
+  ORDER BY node_id;
 
 --
 -- Split a face containing an holes in both sides of the split
+-- Faces on both sides contain isolated nodes.
 --
--- Both split faces containing an isolated node.
-SELECT 'T23', 'N' || topology.st_addisonode('city_data', 28, 'POINT(27 33)'), 28;
-SELECT 'T23', 'N' || topology.st_addisonode('city_data', 28, 'POINT(25 38)'), 28;
-SELECT 'T23', 'N' || topology.st_addisonode('city_data', 2, 'POINT(21 36)'), 2;
 INSERT INTO newedge SELECT 23, topology.st_addedgemodface('city_data',
   2, 3,  'LINESTRING(25 30, 29 32, 29 37, 25 35)');
 SELECT 'T23', 'E'||edge_id, next_left_edge, next_right_edge,
index d317d7fe20b5dc449546da6f8624971c774a4235..ecf7409f1edfc19b53a964bc16f4a8422adb146c 100644 (file)
@@ -97,22 +97,25 @@ T21|E16|29|-47|12|0
 T21|E36|-13|-36|0|19
 T21|E46|-14|47|26|27
 T21|E47|-46|36|27|0
+T22-|N27|23
+T22-|N28|23
+T22-|N29|23
 T22|E2|3|39|28|0
 T22|E3|48|2|28|28
 T22|E42|42|-42|28|2
 T22|E48|-3|-48|28|23
-T23|N27|28
-T23|N28|28
-T23|N29|2
+T22|N27|28
+T22|N28|23
+T22|N29|28
 T23|E2|3|39|28|0
 T23|E3|-49|49|28|29
 T23|E39|-2|-39|0|22
 T23|E42|42|-42|28|2
 T23|E48|-3|-48|29|23
 T23|E49|48|2|29|28
-T23|N27|29
-T23|N28|28
-T23|N29|2
+T23|N27|28
+T23|N28|23
+T23|N29|29
 F3,F4|{3:3,3:4,3:10,3:16,3:17}
 F5,N4|{1:4,3:5,3:11}
 F0|
index 4905c391d4bf6e84b085a77548c7625b083398b5..235aef352059a993a39708e8a860d30739b90b22 100644 (file)
@@ -342,7 +342,11 @@ SELECT 'T21', 'E'||edge_id, next_left_edge, next_right_edge,
 
 --
 -- Split a face containing an hole 
+-- Faces on both sides contain isolated nodes.
 --
+SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 32, 'POINT(26 36)'), 32;
+SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 32, 'POINT(26 34.5)'), 32;
+SELECT 'T22-', 'N' || topology.st_addisonode('city_data', 32, 'POINT(26 33)'), 32;
 INSERT INTO newedge SELECT 22, topology.st_addedgenewfaces('city_data',
   3, 3,  'LINESTRING(25 35, 27 35, 26 34, 25 35)');
 SELECT 'T22', 'E'||edge_id, next_left_edge, next_right_edge,
@@ -351,14 +355,14 @@ SELECT 'T22', 'E'||edge_id, next_left_edge, next_right_edge,
     SELECT edge_id FROM newedge WHERE id IN (22, 16)
     UNION VALUES (2),(3) )
   ORDER BY edge_id;
+SELECT 'T22', 'N' || node_id, containing_face FROM
+  city_data.node WHERE node_id IN ( 27, 28, 29 )
+  ORDER BY node_id;
 
 --
 -- Split a face containing an holes in both sides of the split
+-- Faces on both sides contain isolated nodes.
 --
--- Both split faces containing an isolated node.
-SELECT 'T23', 'N' || topology.st_addisonode('city_data', 38, 'POINT(27 33)'), 38;
-SELECT 'T23', 'N' || topology.st_addisonode('city_data', 38, 'POINT(25 38)'), 38;
-SELECT 'T23', 'N' || topology.st_addisonode('city_data', 31, 'POINT(21 36)'), 31;
 INSERT INTO newedge SELECT 23, topology.st_addedgenewfaces('city_data',
   2, 3,  'LINESTRING(25 30, 29 32, 29 37, 25 35)');
 SELECT 'T23', 'E'||edge_id, next_left_edge, next_right_edge,
index 55094f6746d3c8efee647f2bd5b1a1d45de05b15..1debd775c9165758974dea2f462cef6cad894bf4 100644 (file)
@@ -97,22 +97,25 @@ T21|E16|29|-47|15|0
 T21|E36|-13|-36|0|27
 T21|E46|-14|47|35|36
 T21|E47|-46|36|36|0
+T22-|N27|32
+T22-|N28|32
+T22-|N29|32
 T22|E2|3|39|38|0
 T22|E3|48|2|38|38
 T22|E42|42|-42|38|31
 T22|E48|-3|-48|38|37
-T23|N27|38
-T23|N28|38
-T23|N29|31
+T22|N27|38
+T22|N28|37
+T22|N29|38
 T23|E2|3|39|39|0
 T23|E3|-49|49|39|40
 T23|E39|-2|-39|0|30
 T23|E42|42|-42|39|31
 T23|E48|-3|-48|40|37
 T23|E49|48|2|40|39
-T23|N27|40
-T23|N28|39
-T23|N29|31
+T23|N27|39
+T23|N28|37
+T23|N29|40
 F3,F4|{3:10,3:11,3:22,3:24,3:25}
 F5,N4|{1:4,3:12,3:13}
 F0|