ST_Envelope — Returns the polygon representation of the extent of the raster.
geometry ST_Envelope(
raster rast)
;
Returns the polygon representation of the extent of the raster in spatial coordinate units defined by srid. It is a float8 minimum bounding box represented as a polygon.
The polygon is defined by the corner points of the bounding box
((MINX
, MINY
),
(MINX
, MAXY
),
(MAXX
, MAXY
),
(MAXX
, MINY
),
(MINX
, MINY
))
SELECT rid, ST_AsText(ST_Envelope(rast)) As envgeomwkt FROM dummy_rast; rid | envgeomwkt -----+-------------------------------------------------------------------- 1 | POLYGON((0 0,20 0,20 60,0 60,0 0)) 2 | POLYGON((3427927 5793243,3427928 5793243, 3427928 5793244,3427927 5793244, 3427927 5793243))