Converts a boxndf bounding box into a geometry object. The output dimension depends on which spatial dimensions the bounding box contains.
Syntax
geometry ST_BoxNDFToGeom(boxndf box);Parameters
| Parameter | Description |
|---|---|
box | The bounding box to convert. |
Behavior
If the bounding box includes the z dimension, the function returns a three-dimensional geometry.
If the bounding box does not include the z dimension, the function returns a two-dimensional geometry.
If the bounding box does not include the x or y dimension, the function returns NULL.
Example
SELECT ST_AsText(ST_BoxndfToGeom(ST_MakeBox2dt(0,0,'2000-01-01'::timestamp, 20,20, '2020-01-01'::timestamp)));
st_astext
------------------------------------
POLYGON((0 0,0 20,20 20,20 0,0 0))该文章对您有帮助吗?