16.10 - Geospatial Data Types - Teradata Database

Teradata Database Design

Teradata Database
Release Number
Release Date
June 2017
Content Type
User Guide
Publication ID
English (United States)

Teradata Database provides these geospatial data types, which are stored in the SYSUDTLIB database:

  • MBR
  • MBB
  • ST_Geometry

For a full description of the geospatial data types, see SQL Geospatial Types.


MBR returns the minimum bounding rectangle of a geometry. It is based on four DOUBLE PRECISION data types hat store attributes of the MBR. MBR types require (4 x 8) = 32 bytes of storage.

The MBR data type is a Teradata extension to the ANSI/ISO SQL:2011 standard.


The MBB type is the 3-D equivalent to the MBR type. MBB returns the 3-dimensional minimum bounding box around a 3-D spatial object. It is based on six DOUBLE PRECISION data types that store attributes of the MBB. MBB types require (6 x 8) = 48 bytes of storage.


Teradata provides the ST_Geometry data type for creating and manipulating geometric shapes in the database. ST_Geometry is implemented as a user-defined type (UDT). ST_Geometry is an instantiable type within Teradata Database. (Teradata Database UDTs do not support inheritance or subtyping.) You can use ST_Geometry as the data type of a table column to represent most of the geospatial types specified in the standard.

A column of type ST_Geometry can contain any of these geospatial types:

  • GeometryCollection
  • GeoSequence
  • LineString
  • MultiLineString
  • MultiPoint
  • MultiPolygon
  • Point
  • Polygon

ST_Geometry data can be stored inline (inside a row) or outside the row in a LOB subtable or both, depending on the syntax used to specify it:

Syntax Default Inline Storage Maximum Length LOB/Non-LOB
ST_GEOMETRY About 10,000 bytes 16,776,192 bytes LOB
ST_GEOMETRY(n), where n <= 64,000 n bytes n bytes Non-LOB
ST_GEOMETRY(n), where n > 64,000 About 10,000 bytes n bytes LOB
ST_GEOMETRY(n) INLINE LENGTH m m bytes n bytes

If n <= m, Non-LOB

Otherwise, LOB

The default value for inline length is 10,000 bytes and the default value for data stored in the LOB subtable is 10 MB.

Teradata Database reserves space within the row for an additional 128 bytes of metadata whether the spatial object is stored within or outside the row.

Related Topics

For complete information about the geospatial data types supported by Teradata Database, see Teradata Geospatial Types.