Minimum Bounding Types | Geospatial Data Types | Teradata Vantage - Minimum Bounding Types - Analytics Database - Teradata Vantage

Geospatial Data Types

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-08-30
dita:mapPath
qgk1628112272483.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ghz1472251264557
lifecycle
latest
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. 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.

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