Minimum Bounding Types - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantageā„¢ Geospatial Data Types

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1181-162K

When working with geospatial data, it is often convenient to find the smallest rectangle or box shape that could contain a given 2D or 3D shape. Teradata Database includes methods and types that let you determine these "minimum bounding" shapes.

The ST_MBR() and MBB() methods on ST_Geometry return MBR and MBB types, respectively, that define these minimum bounding rectangle and box shapes. These are Teradata extensions to the SQL/MM Spatial standard.

Example: Finding the Minimum Bounding Box of Geometric Shapes

Consider the following table definition:

CREATE TABLE sample_MBRs (skey INTEGER, shape_mbr MBR);

The following SQL would obtain the MBR of each geometry in the shape column of the sample_shapes table using the ST_MBR method for ST_Geometry objects.

INSERT INTO sample_MBRs
SELECT skey, shape.ST_MBR()
FROM sample_shapes;