</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>
</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>
<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>