From 9bc1a87bc184fb6f86dbede292ce4d0f697df425 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Thu, 24 Nov 2011 03:44:16 +0000 Subject: [PATCH] provide examples for ST_GeomFromGeoJSON now that I can compile it :) git-svn-id: http://svn.osgeo.org/postgis/trunk@8235 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference_constructor.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/reference_constructor.xml b/doc/reference_constructor.xml index 54decb766..4fe2fc4a9 100644 --- a/doc/reference_constructor.xml +++ b/doc/reference_constructor.xml @@ -602,18 +602,29 @@ SELECT ST_GeomFromEWKT('POLYHEDRALSURFACE( ST_GeomFromGeoJSON works only for JSON Geometry fragments. It throws an error if you try to use it on a whole JSON document. Availability: 2.0.0 requires - JSON-C >= 0.9 + &Z_support; Examples - - COMING SOON + SELECT ST_AsText(ST_GeomFromGeoJSON('{"type":"Point","coordinates":[-48.23456,20.12345]}')) As wkt; +wkt +------ +POINT(-48.23456 20.12345) + +-- 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) + See Also - + , -- 2.40.0