From: Regina Obe Date: Tue, 16 Sep 2008 13:35:08 +0000 (+0000) Subject: Cleanup of FAQ X-Git-Tag: 1.4.0b1~738 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a62e0263771840a93c5d6eb1aa27040db4d4a39;p=postgis Cleanup of FAQ git-svn-id: http://svn.osgeo.org/postgis/trunk@2969 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/faq.xml b/doc/faq.xml index 9b6e04267..48ca07c11 100644 --- a/doc/faq.xml +++ b/doc/faq.xml @@ -40,7 +40,7 @@ SELECT AddGeometryColumn('', 'gtest','geom',-1,'LINESTRING',2); VALUES ( 1, 'First Geometry', - GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1) + ST_GeomFromText('LINESTRING(2 3,4 5,6 5,7 8)', -1) ); For more information about other GIS objects, see the To view your GIS data in the table: - SELECT id, name, AsText(geom) AS geom FROM gtest; + SELECT id, name, ST_AsText(geom) AS geom FROM gtest; The return value should look something like this: @@ -91,9 +91,7 @@ VALUES ( SELECT id, the_geom FROM thetable WHERE - the_geom && 'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))' -AND - _ST_Contains(the_geom,'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); + ST_Contains(the_geom,'POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'); @@ -229,7 +227,8 @@ AND coordinate systems must be defined in the SPATIAL_REF_SYS table, and the geometries being reprojected must already have an SRID set on them. Once that is done, a reprojection is as simple as referring to - the desired destination SRID. + the desired destination SRID. The below projects a geometry to NAD 83 long lat. + The below will only work if the srid of the_geom is not -1 (not undefined spatial ref) SELECT ST_Transform(the_geom,4269) FROM geotable;