]> granicus.if.org Git - postgis/commitdiff
provide examples for ST_GeomFromGeoJSON now that I can compile it :)
authorRegina Obe <lr@pcorp.us>
Thu, 24 Nov 2011 03:44:16 +0000 (03:44 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 24 Nov 2011 03:44:16 +0000 (03:44 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8235 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference_constructor.xml

index 54decb7664c1f2f2e0dcf60931002d7dbf1cb188..4fe2fc4a901f66816361b95ac49ce68738d1cfc5 100644 (file)
@@ -602,18 +602,29 @@ SELECT ST_GeomFromEWKT('POLYHEDRALSURFACE(
                <para>ST_GeomFromGeoJSON works only for JSON Geometry fragments. It throws an error if you try to use it on a whole JSON document.</para>
                
                <para>Availability: 2.0.0 requires - JSON-C &gt;= 0.9</para>
+               <para>&Z_support;</para>
          </refsection>
  
         <refsection>
                <title>Examples</title>
-               <!-- TODO -->
-               COMING SOON
+               <programlisting>SELECT ST_AsText(ST_GeomFromGeoJSON('{"type":"Point","coordinates":[-48.23456,20.12345]}')) As wkt;
+wkt
+------
+POINT(-48.23456 20.12345)
+</programlisting>
+<programlisting>-- a 3D linestring
+SELECT ST_AsText(ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[1,2,3],[4,5,6],[7,8,9]]}')) As wkt;
+
+wkt
+-------------------
+LINESTRING(1 2,4 5,7 8)
+</programlisting> 
          </refsection>
 
 
          <refsection>
                <title>See Also</title>
-               <para><xref linkend="ST_AsGeoJSON" /></para>
+               <para><xref linkend="ST_AsText" />,<xref linkend="ST_AsGeoJSON" /></para>
          </refsection>
        </refentry>