]> granicus.if.org Git - postgis/commitdiff
Preliminary documentation for ST_GeomFromGML and logic to support gml input parameters
authorRegina Obe <lr@pcorp.us>
Fri, 23 Oct 2009 13:26:33 +0000 (13:26 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 23 Oct 2009 13:26:33 +0000 (13:26 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@4672 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/xsl/postgis_gardentest.sql.xsl
doc/xsl/postgis_gardentest_subset.sql.xsl

index 04e4f2cccea3779764f8c163ed2822f120696faa..e81ffebf5dcdea2968effdb79cfd107cf4ec87c2 100644 (file)
@@ -1399,6 +1399,52 @@ SELECT ST_GeomFromEWKT('CIRCULARSTRING(220268 150415 1,220227 150505 2,220227 15
                        <para><xref linkend="ST_GeomFromText" /></para>
                  </refsection>
        </refentry>
+       
+       <refentry id="ST_GeomFromGML">
+         <refnamediv>
+               <refname>ST_GeomFromGML</refname>
+               <refpurpose>Takes as input GML representation of geometry and outputs a PostGIS geometry object</refpurpose>
+         </refnamediv>
+
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>geometry <function>ST_GeomFromGML</function></funcdef>
+                       <paramdef><type>text </type> <parameter>geomgml</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+
+         <refsection>
+               <title>Description</title>
+               <para>Constructs a PostGIS ST_Geometry object from the OGC GML representation.</para>
+               <note>
+                       <para>The EWKB format is not an OGC standard, but a PostGIS specific format that includes the spatial reference system (SRID)
+                       identifier</para>
+               </note>
+               <!-- Optionally mention 3d support -->
+               <para><inlinemediaobject>
+               <imageobject>
+                 <imagedata fileref="images/check.png" />
+               </imageobject>
+         </inlinemediaobject> This function supports 3d and will not drop the z-index.</para>
+
+         </refsection>
+
+         <refsection>
+               <title>Examples</title>
+       <programlisting>SELECT ST_GeomFromGML('<![CDATA[
+               <gml:LineString srsName="EPSG:4269">
+               <gml:coordinates>-71.16028,42.258729 -71.160837,42.259112 -71.161143,42.25932
+               </gml:coordinates>
+               </gml:LineString>");']]>);
+               </programlisting>
+         </refsection>
+         <refsection>
+               <title>See Also</title>
+               <para><xref linkend="ST_AsGML" /></para>
+         </refsection>
+       </refentry>
 
        <refentry id="ST_GeomFromText">
                  <refnamediv>
index f4a18ddd94d7903e9064a746d40e877b4ec4b2a4..72eef0a8710d2d04a4878719138ee0f094c01eef 100644 (file)
@@ -258,7 +258,7 @@ SELECT 'create,insert,drop Test: End Testing Geography <xsl:value-of select="@Ge
                                <xsl:variable name='fnname'><xsl:value-of select="funcdef/function"/></xsl:variable>\r
                                <xsl:variable name='fndef'><xsl:value-of select="funcdef"/></xsl:variable>\r
                                <xsl:variable name='numparams'><xsl:value-of select="count(paramdef/parameter)" /></xsl:variable>\r
-                               <xsl:variable name='numparamgeoms'><xsl:value-of select="count(paramdef/type[contains(text(),'geometry') or contains(text(),'geography') or contains(text(),'box') or contains(text(), 'bytea')]) + count(paramdef/parameter[contains(text(),'WKT')])" /></xsl:variable>\r
+                               <xsl:variable name='numparamgeoms'><xsl:value-of select="count(paramdef/type[contains(text(),'geometry') or contains(text(),'geography') or contains(text(),'box') or contains(text(), 'bytea')]) + count(paramdef/parameter[contains(text(),'WKT')]) + count(paramdef/parameter[contains(text(),'geomgml')])" /></xsl:variable>\r
                                <xsl:variable name='numparamgeogs'><xsl:value-of select="count(paramdef/type[contains(text(),'geography')] )" /></xsl:variable>\r
                                <!-- For each function prototype generate a test sql statement -->\r
                                <xsl:choose>\r
@@ -368,6 +368,9 @@ SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of sel
                                        <xsl:when test="(contains(parameter, 'version'))">\r
                                                <xsl:value-of select="$var_version2" />\r
                                        </xsl:when>\r
+                                       <xsl:when test="(contains(parameter,'geomgml'))">\r
+                                               <xsl:text>ST_AsGML(foo1.the_geom)</xsl:text>\r
+                                       </xsl:when>\r
                                        <xsl:when test="(contains(type,'box') or type = 'geometry' or type = 'geometry ' or contains(type,'geometry set')) and (position() = 1 or count($func/paramdef/type[contains(text(),'geometry') or contains(text(),'box') or contains(text(), 'WKT') or contains(text(), 'bytea')]) = '1')">\r
                                                <xsl:text>foo1.the_geom</xsl:text>\r
                                        </xsl:when>\r
index 2eda7cb387fc036c738bcff1323db3409d45b60c..b9bbaeee05b282dad456b1e1647e3d59390f484c 100644 (file)
                                <xsl:variable name='fnname'><xsl:value-of select="funcdef/function"/></xsl:variable>\r
                                <xsl:variable name='fndef'><xsl:value-of select="funcdef"/></xsl:variable>\r
                                <xsl:variable name='numparams'><xsl:value-of select="count(paramdef/parameter)" /></xsl:variable>\r
-                               <xsl:variable name='numparamgeoms'><xsl:value-of select="count(paramdef/type[contains(text(),'geometry') or contains(text(),'geography') or contains(text(),'box') or contains(text(), 'bytea')]) + count(paramdef/parameter[contains(text(),'WKT')])" /></xsl:variable>\r
+                               <xsl:variable name='numparamgeoms'><xsl:value-of select="count(paramdef/type[contains(text(),'geometry') or contains(text(),'geography') or contains(text(),'box') or contains(text(), 'bytea')]) + count(paramdef/parameter[contains(text(),'WKT')]) + count(paramdef/parameter[contains(text(),'geomgml')])" /></xsl:variable>\r
                                <xsl:variable name='numparamgeogs'><xsl:value-of select="count(paramdef/type[contains(text(),'geography')] )" /></xsl:variable>\r
                                <!-- For each function prototype generate a test sql statement -->\r
                                <xsl:choose>\r
@@ -282,6 +282,9 @@ SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of sel
                                        <xsl:when test="(contains(parameter, 'version'))">\r
                                                <xsl:value-of select="$var_version2" />\r
                                        </xsl:when>\r
+                                       <xsl:when test="(contains(parameter,'geomgml'))">\r
+                                               <xsl:text>ST_AsGML(foo1.the_geom)</xsl:text>\r
+                                       </xsl:when>\r
                                        <xsl:when test="(contains(type,'box') or type = 'geometry' or type = 'geometry ' or contains(type,'geometry set')) and (position() = 1 or count($func/paramdef/type[contains(text(),'geometry') or contains(text(),'box') or contains(text(), 'WKT') or contains(text(), 'bytea')]) = '1')">\r
                                                <xsl:text>foo1.the_geom</xsl:text>\r
                                        </xsl:when>\r