--
-- 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,
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,
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|
--
-- 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,
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,
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|