15.10 - Loading Geometry Data - Teradata Database

Teradata Database SQL Geospatial Types

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1181-151K

SQL/MM Spatial defines a well-known text (WKT) and a well-known binary (WKB) representation for each geospatial type. Client applications can load geospatial data by passing a CLOB value in the WKT format.

Consider the previous definition of the sample_shapes table. The following example inserts a point value into the shape column using the WKT representation of a point:

   INSERT INTO sample_shapes 
   VALUES (1001, 'POINT(10 20)');

Teradata Database also defines ST_Geometry constructors and UDFs that client applications can call, passing in the WKT or WKB representation of a geospatial type and getting an ST_Geometry value as a result.

For details on WKT and WKB formats, see Chapter 13: “Data Loading, Data Unloading, and Formats.”

Teradata provides a data loading tool called TDGeoImport that you can use to efficiently convert geospatial data into a format that is compatible with the Teradata geospatial UDTs. TDGeoImport is an executable that you can run on a Microsoft Windows client.

TDGeoImport converts layers from ESRI, MapInfo, and TIGER/Line data sources and loads them directly into the database.

The TDGeoImport data loading tool is available from Teradata Developer Exchange (developer.teradata.com/).

Geospatial data can have a maximum size of approximately 16MB, allowing for representations of approximately one million points.

You cannot create a table with more than 6 ST_Geometry columns, assuming a geometry of
< 10 KB and a 64K row size.

Additionally, Teradata load utilities that cannot directly load LOB types similarly cannot load ST_Geometry types.