]> granicus.if.org Git - postgis/commitdiff
Fix #879 (get rid of use of both deprecated line_locate_point and line_substring...
authorRegina Obe <lr@pcorp.us>
Tue, 22 Mar 2011 05:44:52 +0000 (05:44 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 22 Mar 2011 05:44:52 +0000 (05:44 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@6952 b70326c6-7e19-0410-871a-916f4a2858ee

doc/extras_topology.xml
topology/sql/sqlmm.sql

index 5cbcfead5755b4c3ef6b0a89a96a69d10fdb264c..9dfe9dc6710875d4eba663ca49049e7fef5d2c67 100644 (file)
@@ -1504,6 +1504,63 @@ SELECT ST_AsText(topology.ST_GetFaceGeometry('ma_topo', 1)) As facegeomwkt;
                                <title>See Also</title>
                        </refsection>
                </refentry>
+               
+               <refentry id="ST_ModEdgeSplit">
+                       <refnamediv>
+                               <refname>ST_ModEdgeSplit</refname>
+                       
+                               <refpurpose>Split an edge by creating a new node along an existing edge, modifying the original edge and adding a new edge.</refpurpose>
+                       </refnamediv>
+               
+                       <refsynopsisdiv>
+                               <funcsynopsis>
+                                       <funcprototype>
+                                       <funcdef>text <function>ST_ModEdgeSplit</function></funcdef>
+                                       <paramdef><type>varchar </type> <parameter>atopology</parameter></paramdef>
+                                       <paramdef><type>integer </type> <parameter>anedge</parameter></paramdef>
+                                       <paramdef><type>geometry </type> <parameter>apoint</parameter></paramdef>
+                                       </funcprototype>
+                               </funcsynopsis>
+                       </refsynopsisdiv>
+               
+                       <refsection>
+                <title>Description</title>
+            
+                <para>Split an edge by creating a new node along an existing edge, modifying the original edge and adding a new edge.</para>
+              
+                       
+                <!-- use this format if new function -->
+                <para>Availability: 1.? </para>
+                <para>Changed: 2.0 - In prior versions, this was misnamed ST_ModEdgesSplit</para>
+                <para>&sqlmm_compliant; SQL-MM: Topo-Geo and Topo-Net 3: Routine Details:  X.3.9</para>
+                       </refsection>
+               
+               
+                       <refsection>
+                               <title>Examples</title>
+                               <programlisting>
+-- 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
+</programlisting>
+                       </refsection>
+               
+                       <!-- Optionally add a "See Also" section -->
+                       <refsection>
+                               <title>See Also</title>
+                               <para><xref linkend="AddEdge"/></para>
+                       </refsection>
+               </refentry>
+               
                <refentry id="ST_MoveIsoNode">
                        <refnamediv>
                                <refname>ST_MoveIsoNode</refname>
index 552a5c2d20b61b68622048ca122503d74de9d7f7..ec28640916a96a371a2a7579ce7591c2662ad4af 100644 (file)
@@ -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);
 
 
        --