From 6c19c2a9eb02eb840a047b48a4c32cf47d9a03c8 Mon Sep 17 00:00:00 2001 From: Regina Obe Date: Thu, 31 Jul 2008 12:14:56 +0000 Subject: [PATCH] Moved over remaining geometry output functions and put in availability for each. git-svn-id: http://svn.osgeo.org/postgis/trunk@2902 b70326c6-7e19-0410-871a-916f4a2858ee --- doc/reference.xml | 94 ------------- doc/reference_new.xml | 311 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 309 insertions(+), 96 deletions(-) diff --git a/doc/reference.xml b/doc/reference.xml index 0d6f0342d..0f4c49de2 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -1153,100 +1153,6 @@ GROUP BY gid, field1,field2; - - Geometry Outputs - - - - ST_AsHEXEWKB(geometry, {'NDR'|'XDR'}) - - - Returns a Geometry in HEXEWKB format (as text) using either - little-endian (NDR) or big-endian (XDR) encoding. - - - - - ST_AsSVG(geometry, [rel], [precision]) - - - Return the geometry as SVG path data. Use 1 as second - argument to have the path data implemented in terms of relative - moves, the default (or 0) uses absolute moves. Third argument may - be used to reduce the maximum number of decimal digits used in - output (defaults to 15). Point geometries will be rendered as - cx/cy when 'rel' arg is 0, x/y when 'rel' is 1. Multipoint - geometries are delimited by commas (","), GeometryCollection - geometries are delimited by semicolons (";"). - - - - - ST_AsGML([version], geometry, [precision]) - - - Return the geometry as a GML element. The version parameter, - if specified, may be either 2 or 3. If no version parameter is - specified then the default is assumed to be 2. The third argument - may be used to reduce the maximum number of significant digits - used in output (defaults to 15). - - - - - ST_AsKML(geometry, [precision]) - - - Return the geometry as a KML element. Second argument may be - used to reduce the maximum number of significant digits used in - output (defaults to 15). - - - - - ST_AsGeoJson([version], geometry, [precision], - [options]) - - - Return the geometry as a GeoJson element. (Cf GeoJson - specifications 1.0). 2D and 3D Geometries are both - supported. GeoJson only support SFS 1.1 geometry type (no curve - support for example). - - The version parameter, if specified, must be 1. - - The third argument may be used to reduce the maximum number - of significant digits used in output (defaults to 15). - - The last 'options' argument could be used to add Bbox or Crs - in GeoJSON output: - - - 0: means no option (default value) - - - - 1: GeoJson CRS - - - - 2: GeoJson Bbox - - - - 3: Both GeoJson Bbox and CRS - - - GeoJson CRS pattern is: auth_name:auth_srid - from spatial_ref_sys table (EPSG:4326 for instance). - - Availability: 1.3.4 - - - - - Geometry Constructors diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 32738a617..dfd7980f0 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -2165,7 +2165,7 @@ CREATE INDEX idx_the_geom_26986_parcels , , , - + ST_AsEWKB Return the Well-Known Binary (WKB) representation of the geometry with SRID meta data. @@ -2287,8 +2287,315 @@ SRID=4326;POLYGON((0 0,0 1,1 1,1 0,0 0)) See Also , + + + + ST_AsGeoJson + + Return the geometry as a GeoJson element. + + + + + + text ST_AsGeoJSON + geometry g1 + + + text ST_AsGeoJSON + geometry g1 + integer max_decimal_digits + + + text ST_AsGeoJSON + geometry g1 + integer max_decimal_digits + integer options + + + text ST_AsGeoJSON + integer version + geometry g1 + + + text ST_AsGeoJSON + integer version + geometry g1 + integer max_decimal_digits + + + text ST_AsGeoJSON + integer version + geometry g1 + integer max_decimal_digits + integer options + + + + + + Description + + Return the geometry as a GeoJson element. (Cf GeoJson + specifications 1.0). 2D and 3D Geometries are both + supported. GeoJson only support SFS 1.1 geometry type (no curve + support for example). + + The version parameter, if specified, must be 1. + + The third argument may be used to reduce the maximum number + of significant digits used in output (defaults to 15). + + The last 'options' argument could be used to add Bbox or Crs + in GeoJSON output: + + + 0: means no option (default value) + + + + 1: GeoJson CRS + + + + 2: GeoJson Bbox + + + + 3: Both GeoJson Bbox and CRS + + + GeoJson CRS pattern is: auth_name:auth_srid + from spatial_ref_sys table (EPSG:4326 for instance). + + Version 1: ST_AsGeoJson(geom) / precision=15 version=1 options=0 + Version 2: ST_AsGeoJson(geom, precision) / version=1 options=0 + Version 3: ST_AsGeoJson(geom, precision, options) / version=1 + Version 4: ST_AsGeoJson(version, geom) / precision=15 options=0 + Version 5: ST_AsGeoJson(version, geom, precision) /options=0 + Version 6: ST_AsGeoJson(version, geom, precision,options) + + Availability: 1.3.4 + + + + Examples + + + + + + ST_AsGML + Return the geometry as a GML version 2 or 3 element. + + + + + + text ST_AsGML + geometry g1 + + + text ST_AsGML + geometry g1 + integer max_num_decimal_digits + + + text ST_AsGML + integer version + geometry g1 + integer max_num_decimal_digits + + + + + + + Description + + Return the geometry as a Geography Markup Language (GML) element. The version parameter, + if specified, may be either 2 or 3. If no version parameter is + specified then the default is assumed to be 2. The third argument + may be used to reduce the maximum number of significant digits + used in output (defaults to 15). + + + + + Availability: 1.3.2 + + + + + Examples + SELECT ST_AsGML(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326)); + + st_asgml + -------- + + + + + + + + ST_AsHEXEWKB + + Returns a Geometry in HEXEWKB format (as text) using either + little-endian (NDR) or big-endian (XDR) encoding. + + + + + + text ST_AsHEXEWKB + geometry g1 + text NDRorXDR + + + + text ST_AsHEXEWKB + geometry g1 + + + + + + Description + + Returns a Geometry in HEXEWKB format (as text) using either + little-endian (NDR) or big-endian (XDR) encoding. If no encoding is specified, then NDR is used. + + + Availability: 1.2.2 + + + + + Examples + SELECT ST_AsHEXEWKB(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326)); + which gives same answer as + + SELECT ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326)::text; + + st_ashexewkb + -------- + 0103000020E6100000010000000500 + 00000000000000000000000000000000 + 00000000000000000000000000000000F03F + 000000000000F03F000000000000F03F000000000000F03 + F000000000000000000000000000000000000000000000000 + + + + + + ST_AsKML + + Return the geometry as a KML element. Second argument may be + used to reduce the maximum number of significant digits used in + output (defaults to 15). + + + + + + text ST_AsKML + geometry g1 + + + text ST_AsKML + geometry g1 + integer max_num_decimal_digits + + + + + + + Description + + Return the geometry as a Keyhole Markup Language (KML) element. Second argument may be + used to reduce the maximum number of significant digits used in + output (defaults to 15). + + + + + Availability: 1.2.2 - later variants that include version param came in 1.3.2 + + + + + Examples + SELECT ST_AsKML(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326)); + + st_askml + -------- + + + 0,0 0,1 1,1 1,0 0,0 + + + + + + + + + ST_AsSVG + + Returns a Geometry in SVG path data. + + + + + + text ST_AsSVG + geometry g1 + + + text ST_AsSVG + geometry g1 + integer rel + + + text ST_AsSVG + geometry g1 + integer rel + integer maxdecimaldigits + + + + + + Description + + Return the geometry as Scalar Vector Graphics (SVG) path data. Use 1 as second + argument to have the path data implemented in terms of relative + moves, the default (or 0) uses absolute moves. Third argument may + be used to reduce the maximum number of decimal digits used in + output (defaults to 15). Point geometries will be rendered as + cx/cy when 'rel' arg is 0, x/y when 'rel' is 1. Multipoint + geometries are delimited by commas (","), GeometryCollection + geometries are delimited by semicolons (";"). + + + Availability: 1.2.2 + + + + + Examples + SELECT ST_AsSVG(ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))',4326)); + + st_assvg + -------- + M 0 0 0 -1 1 -1 1 0 Z + - + ST_AsText Return the Well-Known Text (WKT) representation of the geometry without SRID metadata. -- 2.50.1