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