Minimum Bounding Types | Geospatial Data Types | Teradata Vantage - 17.10 - Minimum Bounding Types - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Geospatial Data Types

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

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. Vantage 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.

SELECT skey, shape.ST_MBR()
FROM sample_shapes;