All Products
Search
Document Center

ApsaraDB RDS:ST_envelopeGeometry

Last Updated:Oct 16, 2024

This function returns the bounding box of a pcpatch object as a geometry object.

Syntax

geometry ST_envelopeGeometry(pcpatch pc);

Parameters

Parameter

Description

pc

The pcpatch object.

Description

A bounding box is a 2D geometry object of GanosBase Geometry.

Examples

SELECT ST_AsText(ST_EnvelopeGeometry(pa)) FROM patches LIMIT 1;
                                                     st_astext
-------------------------------------------------------------------------------------------------------------------
 POLYGON((-126.60000000000001 45.4,-126.60000000000001 45.49,-126.51 45.49,-126.51 45.4,-126.60000000000001 45.4))
(1 row)


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