ST_envelopeGeometry

更新时间:
复制 MD 格式

Returns the bounding box of a pcpatch object as a geometry object. Useful for performing 2D intersection tests with Ganos Geometry geometries and building spatial indexes on point cloud data.

Syntax

geometry ST_envelopeGeometry(pcpatch pc);

Parameters

ParameterDescription
pcThe pcpatch object.

Description

The returned bounding box is a 2D geometry object of Ganos Geometry.

Examples

Retrieve the bounding box of a patch as well-known text (WKT):

SELECT ST_AsText(ST_EnvelopeGeometry(pa)) FROM patches LIMIT 1;

Output:

POLYGON((-126.99 45.01,-126.99 45.09,-126.91 45.09,-126.91 45.01,-126.99 45.01))

To speed up spatial queries on point cloud data, create a GIST index on the bounding box:

CREATE INDEX ON patches USING GIST(ST_EnvelopeGeometry(patch));