ST_BoxndfToGeom

更新时间:
复制 MD 格式

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

ParameterDescription
boxThe 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))