12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>97 / 3107.4.6 ST_EnvelopeST_Envelope — Returns a geometry representing the double precision (float8) bounding box of the supplied geometry.Synopsisgeometry ST_Envelope(geometry g1);DescriptionReturns the float8 minimum bounding box for the supplied geometry, as a geometry. The polygon is defined by the cornerpoints of the bounding box ((MINX, MINY), (MINX, MAXY), (MAXX, MAXY), (MAXX, MINY), (MINX, MINY)). (<strong>PostGIS</strong> will adda ZMIN/ZMAX coordinate as well).Degenerate cases (vertical lines, points) will return a geometry of lower dimension than POLYGON, ie. POINT or LINESTRING.Availability: 1.5.0 behavior changed to output double precision instead of float4This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1. s2.1.1.1This method implements the SQL/MM specification. SQL-MM 3: 5.1.15ExamplesSELECT ST_AsText(ST_Envelope(’POINT(1 3)’::geometry));st_astext------------POINT(1 3)(1 row)SELECT ST_AsText(ST_Envelope(’LINESTRING(0 0, 1 3)’::geometry));st_astext--------------------------------POLYGON((0 0,0 3,1 3,1 0,0 0))(1 row)SELECT ST_AsText(ST_Envelope(’POLYGON((0 0, 0 1, 1.0000001 1, 1.0000001 0, 0 0))’::geometry ←↪));st_astext--------------------------------------------------------------POLYGON((0 0,0 1,1.00000011920929 1,1.00000011920929 0,0 0))(1 row)SELECT ST_AsText(ST_Envelope(’POLYGON((0 0, 0 1, 1.0000000001 1, 1.0000000001 0, 0 0))’:: ←↪geometry));st_astext--------------------------------------------------------------POLYGON((0 0,0 1,1.00000011920929 1,1.00000011920929 0,0 0))(1 row)SELECT Box3D(geom), Box2D(geom), ST_AsText(ST_Envelope(geom)) As envelopewktFROM (SELECT ’POLYGON((0 0, 0 1000012333334.34545678, 1.0000001 1, 1.0000001 0, 0 0))’:: ←↪geometry As geom) As foo;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!