ST_Geometry Type Casts | Geospatial Data Types | Teradata Vantage - Casts - 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ā„¢
The database implements cast functionality that allows data type conversions between the following types:
  • ST_Geometry and VARCHAR(64000)
  • ST_Geometry and CLOB

To cast a VARCHAR or CLOB to an ST_Geometry type, the VARCHAR or CLOB data must use the WKT format of any of the ST_Geometry subtypes. For example:

INSERT INTO sample_shapes
   VALUES (1001, CAST('LINESTRING(1 1, 2 2, 3 3)' AS ST_Geometry));

For more information on the WKT format of the ST_Geometry type, see Well-Known Text Format.