All Products
Search
Document Center

PolarDB:ST_AsBox

Last Updated:Mar 28, 2026

Returns the bounding box of a geomgrid value as a PostgreSQL box.

Syntax

box ST_AsBox(geomgrid grid);
box[] ST_AsBox(geomgrid[] grid);

Parameters

ParameterTypeDescription
gridgeomgrid / geomgrid[]The grid whose bounding box to compute.

Return value

Input typeReturn type
geomgridbox
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)