Returns the bounding box of a geomgrid value as a PostgreSQL box.
Syntax
box ST_AsBox(geomgrid grid);
box[] ST_AsBox(geomgrid[] grid);Parameters
| Parameter | Type | Description |
|---|---|---|
grid | geomgrid / geomgrid[] | The grid whose bounding box to compute. |
Return value
| Input type | Return type |
|---|---|
geomgrid | box |
geomgrid[] | box[] |
Examples
Get the bounding box of a single grid
SELECT st_asbox(st_gridfromtext('G0013103220310313'));Output:
st_asbox
------------------------------------------------------------------------------
(116.46666666666667,39.31666666666667),(116.4588888888889,39.30888888888889)