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

Geospatial Data Types

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
vci1556127188517.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1181
lifecycle
previous
Product Category
Teradata Vantageā„¢

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;