regress/st_addisoedge.sql \
regress/st_addisonode.sql \
regress/st_addedgenewfaces.sql \
+ regress/st_changeedgegeom.sql \
regress/st_getfacegeometry.sql \
regress/st_getfaceedges.sql \
regress/st_modedgeheal.sql \
-- ST_AddIsoNode edge-crossing node
SELECT topology.ST_AddIsoNode('sqlmm_topology', NULL, 'POINT(5 9.5)');
--------------------------------------------------------------
--- ST_ChangeEdgeGeom
--------------------------------------------------------------
-
-SELECT '-- ST_ChangeEdgeGeom ------------------------';
-
--- good one
-SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 10, 5 8, 10 10)');
-
--- start/end points mismatch
-SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 9, 5 8, 10 10)');
-SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 10, 5 8, 10 9)');
-
--- Node crossing
-SELECT topology.ST_ChangeEdgeGeom('sqlmm_topology', 1, 'LINESTRING(5 10, 10 10)');
-
-------------------------------------------------------------
-- ST_RemoveIsoNode
-------------------------------------------------------------
ERROR: SQL/MM Spatial exception - not isolated node
-- ST_AddIsoNode(2) ------------------------
ERROR: SQL/MM Spatial exception - edge crosses node.
--- ST_ChangeEdgeGeom ------------------------
-Edge 1 changed
-ERROR: SQL/MM Spatial exception - start node not geometry start point.
-ERROR: SQL/MM Spatial exception - end node not geometry end point.
-ERROR: SQL/MM Spatial exception - geometry crosses a node
-- ST_RemoveIsoNode ------------------------
ERROR: SQL/MM Spatial exception - not isolated node
ERROR: SQL/MM Spatial exception - not isolated node
--- /dev/null
+set client_min_messages to ERROR;
+
+\i load_topology.sql
+
+
+-- good one
+SELECT topology.ST_ChangeEdgeGeom('city_data', 25,
+ 'LINESTRING(9 35, 11 33, 13 35)');
+
+-- start/end points mismatch
+SELECT topology.ST_ChangeEdgeGeom('city_data', 25,
+ 'LINESTRING(10 35, 13 35)');
+SELECT topology.ST_ChangeEdgeGeom('city_data', 25,
+ 'LINESTRING(9 35, 13 36)');
+
+-- Node crossing
+SELECT topology.ST_ChangeEdgeGeom('city_data', 3,
+ 'LINESTRING(25 30, 20 36, 20 38, 25 35)');
+
+-- TODO: test edge crossing
+-- TODO: test non-existent edge (#979)
+
+SELECT topology.DropTopology('city_data');
--- /dev/null
+BEGIN
+t
+9
+22
+26
+COMMIT
+Edge 25 changed
+ERROR: SQL/MM Spatial exception - start node not geometry start point.
+ERROR: SQL/MM Spatial exception - end node not geometry end point.
+ERROR: SQL/MM Spatial exception - geometry crosses a node
+Topology 'city_data' dropped