[postgis-commits] svn - r2875 - trunk/doc

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Jul 22 04:38:42 PDT 2008


Author: robe
Date: 2008-07-22 04:38:39 -0700 (Tue, 22 Jul 2008)
New Revision: 2875

Modified:
   trunk/doc/reference.xml
   trunk/doc/reference_new.xml
Log:
Move over ST_AsText, ST_AsEWKT and provide examples.  Change order of ST_Multi.

Modified: trunk/doc/reference.xml
===================================================================
--- trunk/doc/reference.xml	2008-07-22 11:12:32 UTC (rev 2874)
+++ trunk/doc/reference.xml	2008-07-22 11:38:39 UTC (rev 2875)
@@ -380,17 +380,7 @@
       <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>
 
@@ -2378,17 +2368,6 @@
       </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>
 
         <listitem>

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-07-22 11:12:32 UTC (rev 2874)
+++ trunk/doc/reference_new.xml	2008-07-22 11:38:39 UTC (rev 2875)
@@ -970,6 +970,49 @@
 		  </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 @@
       
     </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 @@
 
   <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>



More information about the postgis-commits mailing list