]> granicus.if.org Git - postgis/commitdiff
Move over ST_AsText, ST_AsEWKT and provide examples. Change order of ST_Multi.
authorRegina Obe <lr@pcorp.us>
Tue, 22 Jul 2008 11:38:39 +0000 (11:38 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 22 Jul 2008 11:38:39 +0000 (11:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2875 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml

index 3c8db58cb7755d7025952e0037042f1cac12b1ec..bb02a719b6906d07ebe71238fe81eea16a09c7ac 100644 (file)
       <title>Geometry Accessors</title>
 
       <variablelist>
-        <varlistentry>
-          <term>ST_AsText(geometry)</term>
-
-          <listitem>
-            <para>Return the Well-Known Text representation of the geometry.
-            For example: POLYGON(0 0,0 1,1 1,1 0,0 0)</para>
-
-            <para>OGC SPEC s2.1.1.1</para>
-          </listitem>
-        </varlistentry>
 
         <varlistentry>
           <term>ST_AsBinary(geometry)</term>
@@ -2377,17 +2367,6 @@ WHERE n*100.00/length &lt; 1;
         </listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term>ST_AsText</term>
-
-        <listitem>
-          <para>Return the well-known text representation of an ST_Geometry
-          value.</para>
-
-          <para>SQL-MM 3: 5.1.25</para>
-        </listitem>
-      </varlistentry>
-
       <varlistentry>
         <term>ST_Boundary</term>
 
index 6131e3252b440f264f0b031e22a3fed6b80fea40..5ed334629fc4ac51d9ef6ad52dd35ff6c3b900f5 100644 (file)
@@ -970,6 +970,49 @@ FROM
                  </refsection>
                </refentry> 
                
+<refentry id="ST_Multi">
+               <refnamediv>
+                       <refname>ST_Multi</refname>
+                       
+                       <refpurpose>Returns the geometry as a MULTI* geometry. If the geometry
+                               is already a MULTI*, it is returned unchanged.</refpurpose>
+               </refnamediv>
+               
+               <refsynopsisdiv>
+                       <funcsynopsis>
+                         <funcprototype>
+                               <funcdef>geoometry <function>ST_Multi</function></funcdef>
+                               <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+                         </funcprototype>
+                       </funcsynopsis>
+               </refsynopsisdiv>
+       
+               <refsection>
+                       <title>Description</title>
+                       
+                       <para>Returns the geometry as a MULTI* geometry. If the geometry
+                               is already a MULTI*, it is returned unchanged.</para>
+               
+               </refsection>
+               
+               <refsection>
+                       <title>Examples</title>
+                       
+                       <programlisting>SELECT ST_AsText(ST_Multi(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
+                       743265 2967450,743265.625 2967416,743238 2967416))')));
+                       st_astext
+                       --------------------------------------------------------------------------------------------------
+                       MULTIPOLYGON(((743238 2967416,743238 2967450,743265 2967450,743265.625 2967416,
+                       743238 2967416)))
+                       (1 row)
+                       </programlisting>
+               </refsection>
+               <refsection>
+                       <title>See Also</title>
+                       <para><xref linkend="ST_AsText" /></para>
+               </refsection>
+       </refentry>
+               
        <refentry id="ST_RemovePoint">
          <refnamediv>
                <refname>ST_RemovePoint</refname>
@@ -1095,49 +1138,6 @@ LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2)
       
     </refentry>
        
-       <refentry id="ST_Multi">
-               <refnamediv>
-                       <refname>ST_Multi</refname>
-                       
-                       <refpurpose>Returns the geometry as a MULTI* geometry. If the geometry
-                               is already a MULTI*, it is returned unchanged.</refpurpose>
-               </refnamediv>
-               
-               <refsynopsisdiv>
-                       <funcsynopsis>
-                         <funcprototype>
-                               <funcdef>geoometry <function>ST_Multi</function></funcdef>
-                               <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
-                         </funcprototype>
-                       </funcsynopsis>
-               </refsynopsisdiv>
-       
-               <refsection>
-                       <title>Description</title>
-                       
-                       <para>Returns the geometry as a MULTI* geometry. If the geometry
-                               is already a MULTI*, it is returned unchanged.</para>
-               
-               </refsection>
-               
-               <refsection>
-                       <title>Examples</title>
-                       
-                       <programlisting>SELECT ST_AsText(ST_Multi(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
-                       743265 2967450,743265.625 2967416,743238 2967416))')));
-                       st_astext
-                       --------------------------------------------------------------------------------------------------
-                       MULTIPOLYGON(((743238 2967416,743238 2967450,743265 2967450,743265.625 2967416,
-                       743238 2967416)))
-                       (1 row)
-                       </programlisting>
-               </refsection>
-               <refsection>
-                       <title>See Also</title>
-                       <para><xref linkend="ST_AsText" /></para>
-               </refsection>
-       </refentry>
-       
        <refentry id="ST_Transform">
          <refnamediv>
                <refname>ST_Transform</refname>
@@ -1225,6 +1225,123 @@ CREATE INDEX idx_the_geom_26986_parcels
 
   <sect1>
       <title>Geometry Outputs</title>
+         <refentry id="ST_AsEWKT">
+                 <refnamediv>
+                       <refname>ST_AsEWKT</refname>
+                       <refpurpose>Return the Well-Known Text (WKT) representation of the geometry with SRID meta data.</refpurpose>
+                 </refnamediv>
+               
+                 <refsynopsisdiv>
+                       <funcsynopsis>
+                         <funcprototype>
+                               <funcdef>text <function>ST_AsEWKT</function></funcdef>
+                               <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+                         </funcprototype>
+                       </funcsynopsis>
+                 </refsynopsisdiv>
+               
+                 <refsection>
+                       <title>Description</title>
+               
+                       <para>Returns the Well-Known Text representation of the geometry prefixed with the SRID.</para>
+
+                       <note>
+                         <para>The WKT spec does not include the SRID.  To get the OGC WKT format use ST_AsText</para>
+                       </note>
+                       <note>
+                         <para>ST_AsEWKT is the reverse of ST_GeomFromEWKT.  Use ST_GeomFromEWKT to convert to a postgis geometry from ST_AsEWKT representation.</para>
+                       </note>
+                 </refsection>
+               
+               
+                 <refsection>
+                       <title>Examples</title>
+               
+                       <programlisting>SELECT ST_AsEWKT(ST_SetSRID('01030000000100000005000000000000000000
+000000000000000000000000000000000000000000000000
+F03F000000000000F03F000000000000F03F000000000000F03
+F000000000000000000000000000000000000000000000000', 4326));
+
+           st_asewkt
+--------------------------------
+SRID=4326;POLYGON((0 0,0 1,1 1,1 0,0 0))
+(1 row)</programlisting>
+                 </refsection>
+               
+                 <!-- Optionally add a "See Also" section -->
+                 <refsection>
+                       <title>See Also</title>
+               
+                       <para><xref linkend="ST_AsText" />, <xref linkend="ST_GeomFromEWKT" /></para>
+                 </refsection>
+       </refentry>
+         <refentry id="ST_AsText">
+                 <refnamediv>
+                       <refname>ST_AsText</refname>
+                       <refpurpose>Return the Well-Known Text (WKT) representation of the geometry.</refpurpose>
+                 </refnamediv>
+               
+                 <refsynopsisdiv>
+                       <funcsynopsis>
+                         <funcprototype>
+                               <funcdef>text <function>ST_AsText</function></funcdef>
+                               <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+                         </funcprototype>
+                       </funcsynopsis>
+                 </refsynopsisdiv>
+               
+                 <refsection>
+                       <title>Description</title>
+               
+                       <para>Returns the Well-Known Text representation of the geometry.</para>
+
+                       <note>
+                         <para>The WKT spec does not include the SRID.  To get the SRID as part of the data, use the non-standard
+                               PostGIS ST_AsEWKT()</para>
+                       </note>
+                       <note>
+                         <para>ST_AsText is the reverse of ST_GeomFromText.  Use ST_GeomFromText to convert to a postgis geometry from ST_AsText representation.</para>
+                       </note>
+               
+                       <!-- Optionally mention OpenGIS compliancy if appropriate -->
+                       <para><inlinemediaobject>
+                               <imageobject>
+                                 <imagedata fileref="images/check.png" />
+                               </imageobject>
+                         </inlinemediaobject> This method implements the <ulink
+                       url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple Features
+                       Implementation Specification for SQL. OGC SPEC s2.1.1.1</ulink></para>
+                       
+                        <para><inlinemediaobject>
+        <imageobject>
+          <imagedata fileref="images/check.png" />
+        </imageobject>
+      </inlinemediaobject> This method implements the SQL/MM specification:
+      SQL-MM 3: 5.1.25</para>
+                 </refsection>
+               
+               
+                 <refsection>
+                       <title>Examples</title>
+               
+                       <programlisting>SELECT ST_AsText('01030000000100000005000000000000000000
+000000000000000000000000000000000000000000000000
+F03F000000000000F03F000000000000F03F000000000000F03
+F000000000000000000000000000000000000000000000000');
+
+           st_astext
+--------------------------------
+ POLYGON((0 0,0 1,1 1,1 0,0 0))
+(1 row)</programlisting>
+                 </refsection>
+               
+                 <!-- Optionally add a "See Also" section -->
+                 <refsection>
+                       <title>See Also</title>
+               
+                       <para><xref linkend="ST_AsEWKT" />, <xref linkend="ST_GeomFromText" /></para>
+                 </refsection>
+       </refentry>
   </sect1>
   
   <sect1>