From: Regina Obe Date: Tue, 22 Mar 2011 05:44:52 +0000 (+0000) Subject: Fix #879 (get rid of use of both deprecated line_locate_point and line_substring... X-Git-Tag: 2.0.0alpha1~1850 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9a850b5bbb60d497b49c7c69352e2bbad8f15af;p=postgis Fix #879 (get rid of use of both deprecated line_locate_point and line_substring... document function git-svn-id: http://svn.osgeo.org/postgis/trunk@6952 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/extras_topology.xml b/doc/extras_topology.xml index 5cbcfead5..9dfe9dc67 100644 --- a/doc/extras_topology.xml +++ b/doc/extras_topology.xml @@ -1504,6 +1504,63 @@ SELECT ST_AsText(topology.ST_GetFaceGeometry('ma_topo', 1)) As facegeomwkt; See Also + + + + ST_ModEdgeSplit + + Split an edge by creating a new node along an existing edge, modifying the original edge and adding a new edge. + + + + + + text ST_ModEdgeSplit + varchar atopology + integer anedge + geometry apoint + + + + + + Description + + Split an edge by creating a new node along an existing edge, modifying the original edge and adding a new edge. + + + + Availability: 1.? + Changed: 2.0 - In prior versions, this was misnamed ST_ModEdgesSplit + &sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details: X.3.9 + + + + + Examples + +-- Add an edge -- + SELECT topology.AddEdge('ma_topo', ST_GeomFromText('LINESTRING(227592 893910, 227600 893910)', 26986) ) As edgeid; + +-- edgeid- +3 + + +-- Split the edge -- +SELECT topology.ST_ModEdgeSplit('ma_topo', 3, ST_SetSRID(ST_Point(227594,893910),26986) ) As result; + result +------------------------- +7 + + + + + + See Also + + + + ST_MoveIsoNode diff --git a/topology/sql/sqlmm.sql b/topology/sql/sqlmm.sql index 552a5c2d2..ec2864091 100644 --- a/topology/sql/sqlmm.sql +++ b/topology/sql/sqlmm.sql @@ -790,9 +790,9 @@ BEGIN -- -- Compute new edge -- - nodepos = line_locate_point(oldedge.geom, apoint); - newedge1 = line_substring(oldedge.geom, 0, nodepos); - newedge2 = line_substring(oldedge.geom, nodepos, 1); + nodepos = ST_Line_Locate_Point(oldedge.geom, apoint); + newedge1 = ST_Line_Substring(oldedge.geom, 0, nodepos); + newedge2 = ST_Line_Substring(oldedge.geom, nodepos, 1); --