From: Regina Obe Date: Wed, 30 Dec 2009 15:12:49 +0000 (+0000) Subject: Fix ST_Extent/ST_Expand docs to reflect change in behavior of outputting double preci... X-Git-Tag: 1.5.0b1~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2292b762dbaf36ed452f41aee5f04a51c6c32da1;p=postgis Fix ST_Extent/ST_Expand docs to reflect change in behavior of outputting double precision coords instead of float4. Still need to fix up examples. git-svn-id: http://svn.osgeo.org/postgis/trunk@5081 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference_accessor.xml b/doc/reference_accessor.xml index 70aa4d9d7..ede5458d5 100644 --- a/doc/reference_accessor.xml +++ b/doc/reference_accessor.xml @@ -297,7 +297,7 @@ SELECT ST_AsEWKT(ST_EndPoint('LINESTRING(1 1 2, 1 2 3, 0 0 5)')); ST_Envelope - Returns a geometry representing the bounding box of the + Returns a geometry representing the double precision (float8) bounding box of the supplied geometry. @@ -314,7 +314,7 @@ SELECT ST_AsEWKT(ST_EndPoint('LINESTRING(1 1 2, 1 2 3, 0 0 5)')); Description - Returns the float4 minimum bounding box for the supplied geometry, as a geometry. + Returns the float8 minimum bounding box for the supplied geometry, as a geometry. The polygon is defined by the corner points of the bounding box ((MINX, MINY), (MINX, MAXY), @@ -328,17 +328,7 @@ SELECT ST_AsEWKT(ST_EndPoint('LINESTRING(1 1 2, 1 2 3, 0 0 5)')); lower dimension than POLYGON, ie. POINT or LINESTRING. - - In PostGIS, the bounding box of a geometry is represented internally using - float4s instead of float8s that are used - to store geometries. The bounding box coordinates are floored, guarenteeing - that the geometry is contained entirely within its bounds. This has the - advantage that a geometry's bounding box is half the size as the minimum - bounding rectangle, which means significantly faster indexes and general performance. - But it also means that the bounding box is NOT the same as the minimum bounding - rectangle that bounds the geometry. - - + Availability: 1.5.0 behavior changed to output double precision instead of float4 &sfs_compliant; s2.1.1.1 &sqlmm_compliant; SQL-MM 3: 5.1.15 @@ -375,17 +365,7 @@ SELECT ST_AsText(ST_Envelope('POLYGON((0 0, 0 1, 1.0000000001 1, 1.0000000001 0, SELECT Box3D(geom), Box2D(geom), ST_AsText(ST_Envelope(geom)) As envelopewkt FROM (SELECT 'POLYGON((0 0, 0 1000012333334.34545678, 1.0000001 1, 1.0000001 0, 0 0))'::geometry As geom) As foo; -box3d ------------------------------------------ -BOX3D(0 0 0,1.0000001 1000012333334.35 0) - -box2d ------------------------------------------- -BOX(0 0,1.00000011920929 1000012382208) - -envelopewkt -------------------------------------------------------------------- -POLYGON((0 0,0 1000012382208,1.00000011920929 1000012382208,1.00000011920929 0,0 0)) + diff --git a/doc/reference_misc.xml b/doc/reference_misc.xml index 1d8b063de..13b62bd70 100644 --- a/doc/reference_misc.xml +++ b/doc/reference_misc.xml @@ -221,7 +221,7 @@ BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332) ST_Expand - Returns bounding box expanded in all directions from the bounding box of the input geometry + Returns bounding box expanded in all directions from the bounding box of the input geometry. Uses double-precision @@ -251,7 +251,7 @@ BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332) This function returns a bounding box expanded in all directions from the bounding box of the input geometry, by an - amount specified in the second argument. Very useful for + amount specified in the second argument. Uses double-precision. Very useful for distance() queries, or bounding box queries to add an index filter to the query. There are 3 variants of this. The one that takes a geometry will return a POLYGON geometry representation of the bounding box and is the most commonly used variant. @@ -268,6 +268,10 @@ BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332) Bounding boxes of all geometries are currently 2-d even if they are 3-dimensional geometries. + + + Availability: 1.5.0 behavior changed to output double precision instead of float4 coordinates. + @@ -275,6 +279,7 @@ BOX(-124.659652709961 24.6830825805664,-67.7798080444336 49.0012092590332) Examples Examples below use US National Atlas Equal Area (SRID=2163) which is a meter projection + --10 meter expanded box around bbox of a linestring SELECT CAST(ST_Expand(ST_GeomFromText('LINESTRING(2312980 110676,2312923 110701,2312892 110714)', 2163),10) As box2d); st_expand