]> granicus.if.org Git - postgis/commitdiff
Move over ST_Translate and provide example use
authorRegina Obe <lr@pcorp.us>
Mon, 8 Sep 2008 13:12:59 +0000 (13:12 +0000)
committerRegina Obe <lr@pcorp.us>
Mon, 8 Sep 2008 13:12:59 +0000 (13:12 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2946 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml

index 98b244c230e4fc866bdd9d5a027d28aa6aa6e3c3..952c121d2469f599e11883ca927940174a3fa979 100644 (file)
@@ -1203,15 +1203,6 @@ z' = z </programlisting> This method is a subcase of the 3D method
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term>ST_Translate(geometry, float8, float8, float8)</term>
-
-          <listitem>
-            <para>Translates the geometry to a new location using the numeric
-            parameters as offsets. Ie: translate(geom, X, Y, Z).</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_Scale(geometry, float8, float8, float8)</term>
 
index e4334af342cfd297cf931abcce144a1b88eb3fbb..7b26a3dc843d52847af0b75f473d52be5782d978 100644 (file)
@@ -2606,6 +2606,66 @@ CREATE INDEX idx_the_geom_26986_parcels
                <para><xref linkend="ST_AsText" />, <xref linkend="ST_SetSRID" />, <xref linkend="UpdateGeometrySRID"/></para>
          </refsection>
        </refentry>
+       
+       <refentry id="ST_Translate">
+         <refnamediv>
+               <refname>ST_Translate</refname>
+       
+               <refpurpose>Translates the geometry to a new location using the numeric
+                       parameters as offsets. Ie: ST_Translate(geom, X, Y) or  ST_Translate(geom, X, Y,Z).</refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>geometry <function>ST_Translate</function></funcdef>
+                       <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+                       <paramdef><type>float </type> <parameter>deltax</parameter></paramdef>
+                       <paramdef><type>float </type> <parameter>deltay</parameter></paramdef>
+                 </funcprototype>
+                 <funcprototype>
+                       <funcdef>geometry <function>ST_Translate</function></funcdef>
+                       <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+                       <paramdef><type>float </type> <parameter>deltax</parameter></paramdef>
+                       <paramdef><type>float </type> <parameter>deltay</parameter></paramdef>
+                       <paramdef><type>float </type> <parameter>deltaz</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+               <title>Description</title>
+               
+               <para>Returns a new geometry whose coordinates are translated delta x,delta y,delta z units. Units are
+               based on the units defined in spatial reference (SRID) for this geometry.</para>
+               
+               <para>Availability: 1.2.2</para>
+         </refsection>
+       
+         <refsection>
+               <title>Examples</title>
+               <para>Move a point 1 degree longitude</para>
+               <programlisting>
+       SELECT ST_AsText(ST_Translate(ST_GeomFromText('POINT(-71.01 42.37)',4326),1,0)) As wgs_transgeomtxt;
+       
+       wgs_transgeomtxt
+       ---------------------
+       POINT(-70.01 42.37)
+               </programlisting>
+               <para>Move a linestring 1 degree longitude and 1/2 degree latitude</para>
+               <programlisting>SELECT ST_AsText(ST_Translate(ST_GeomFromText('LINESTRING(-71.01 42.37,-71.11 42.38)',4326),1,0.5)) As wgs_transgeomtxt;
+                  wgs_transgeomtxt
+       ---------------------------------------
+       LINESTRING(-70.01 42.87,-70.11 42.88)
+       </programlisting>
+         </refsection>
+       
+         <!-- Optionally add a "See Also" section -->
+         <refsection>
+               <title>See Also</title>
+               <para><xref linkend="ST_AsText" />, <xref linkend="ST_GeomFromText" /></para>
+         </refsection>
+       </refentry>
   </sect1>
 
   <sect1>