Returns the bounding box of a geomgrid object as a PostgreSQL box type.
Syntax
box ST_AsBox(geomgrid grid);
box[] ST_AsBox(geomgrid[] grid);Parameters
| Parameter | Type | Description |
|---|---|---|
grid | geomgrid | The grid whose bounding box you want to get. |
Return value
The scalar form returns a
boxvalue.The array form returns a
box[]value.
Examples
Single grid
Get the bounding box of a grid specified by its text encoding:
SELECT ST_AsBox(ST_GridFromText('G0013103220310313'));Output:
st_asbox
------------------------------------------------------------------------------
(116.46666666666667,39.31666666666667),(116.4588888888889,39.30888888888889)See also
ST_GridFromText — construct a
geomgridvalue from its text encoding