From 62d34b62311305458cba3d56eff222a0b30be3a8 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Tue, 22 Jul 2008 11:38:39 +0000 Subject: [PATCH] Move over ST_AsText, ST_AsEWKT and provide examples. Change order of ST_Multi. git-svn-id: http://svn.osgeo.org/postgis/trunk@2875 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference.xml | 21 ----- doc/reference_new.xml | 203 +++++++++++++++++++++++++++++++++--------- 2 files changed, 160 insertions(+), 64 deletions(-) diff --git a/doc/reference.xml b/doc/reference.xml index 3c8db58cb..bb02a719b 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -380,16 +380,6 @@ Geometry Accessors - - ST_AsText(geometry) - - - Return the Well-Known Text representation of the geometry. - For example: POLYGON(0 0,0 1,1 1,1 0,0 0) - - OGC SPEC s2.1.1.1 - - ST_AsBinary(geometry) @@ -2377,17 +2367,6 @@ WHERE n*100.00/length < 1; - - ST_AsText - - - Return the well-known text representation of an ST_Geometry - value. - - SQL-MM 3: 5.1.25 - - - ST_Boundary diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 6131e3252..5ed334629 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -970,6 +970,49 @@ FROM + + + ST_Multi + + Returns the geometry as a MULTI* geometry. If the geometry + is already a MULTI*, it is returned unchanged. + + + + + + geoometry ST_Multi + geometry g1 + + + + + + Description + + Returns the geometry as a MULTI* geometry. If the geometry + is already a MULTI*, it is returned unchanged. + + + + + Examples + + SELECT ST_AsText(ST_Multi(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450, + 743265 2967450,743265.625 2967416,743238 2967416))'))); + st_astext + -------------------------------------------------------------------------------------------------- + MULTIPOLYGON(((743238 2967416,743238 2967450,743265 2967450,743265.625 2967416, + 743238 2967416))) + (1 row) + + + + See Also + + + + ST_RemovePoint @@ -1095,49 +1138,6 @@ LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2) - - - ST_Multi - - Returns the geometry as a MULTI* geometry. If the geometry - is already a MULTI*, it is returned unchanged. - - - - - - geoometry ST_Multi - geometry g1 - - - - - - Description - - Returns the geometry as a MULTI* geometry. If the geometry - is already a MULTI*, it is returned unchanged. - - - - - Examples - - SELECT ST_AsText(ST_Multi(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450, - 743265 2967450,743265.625 2967416,743238 2967416))'))); - st_astext - -------------------------------------------------------------------------------------------------- - MULTIPOLYGON(((743238 2967416,743238 2967450,743265 2967450,743265.625 2967416, - 743238 2967416))) - (1 row) - - - - See Also - - - - ST_Transform @@ -1225,6 +1225,123 @@ CREATE INDEX idx_the_geom_26986_parcels Geometry Outputs + + + ST_AsEWKT + Return the Well-Known Text (WKT) representation of the geometry with SRID meta data. + + + + + + text ST_AsEWKT + geometry g1 + + + + + + Description + + Returns the Well-Known Text representation of the geometry prefixed with the SRID. + + + The WKT spec does not include the SRID. To get the OGC WKT format use ST_AsText + + + ST_AsEWKT is the reverse of ST_GeomFromEWKT. Use ST_GeomFromEWKT to convert to a postgis geometry from ST_AsEWKT representation. + + + + + + Examples + + SELECT ST_AsEWKT(ST_SetSRID('01030000000100000005000000000000000000 +000000000000000000000000000000000000000000000000 +F03F000000000000F03F000000000000F03F000000000000F03 +F000000000000000000000000000000000000000000000000', 4326)); + + st_asewkt +-------------------------------- +SRID=4326;POLYGON((0 0,0 1,1 1,1 0,0 0)) +(1 row) + + + + + See Also + + , + + + + + ST_AsText + Return the Well-Known Text (WKT) representation of the geometry. + + + + + + text ST_AsText + geometry g1 + + + + + + Description + + Returns the Well-Known Text representation of the geometry. + + + The WKT spec does not include the SRID. To get the SRID as part of the data, use the non-standard + PostGIS ST_AsEWKT() + + + ST_AsText is the reverse of ST_GeomFromText. Use ST_GeomFromText to convert to a postgis geometry from ST_AsText representation. + + + + + + + + This method implements the OpenGIS Simple Features + Implementation Specification for SQL. OGC SPEC s2.1.1.1 + + + + + + This method implements the SQL/MM specification: + SQL-MM 3: 5.1.25 + + + + + Examples + + SELECT ST_AsText('01030000000100000005000000000000000000 +000000000000000000000000000000000000000000000000 +F03F000000000000F03F000000000000F03F000000000000F03 +F000000000000000000000000000000000000000000000000'); + + st_astext +-------------------------------- + POLYGON((0 0,0 1,1 1,1 0,0 0)) +(1 row) + + + + + See Also + + , + + -- 2.50.1