Functions and Geospatial Data Types | Teradata Vantage - Functions and Geospatial Data Types - Analytics Database - Teradata Vantage

SQL External Routine Programming

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
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

Although Teradata implements the geospatial data types ST_Geometry and MBR as UDTs, these data types are neither distinct nor structured. The geospatial data types are Teradata proprietary internal UDTs (also called system defined types, or SDTs) and as such, are not useful as parameter types or the return type of an external routine.

An application that needs to pass geospatial values to an external routine can use any number of methods on an ST_Geometry or MBR type to get the entire representation or part of the representation as a data type that can be passed to an external routine.

What UDF Needs What to Pass to External Routine
Entire representation of ST_Geometry type in text format Well-known text representation of ST_Geometry value, by calling ST_AsText method.
Entire representation of ST_Geometry type in binary format Well-known binary representation of ST_Geometry value, by calling ST_AsBinary method.
Part of ST_Geometry value, such as X or Y coordinate of ST_Point Value, by calling appropriate method, such as ST_X or ST_Y.

See Teradata Vantageā„¢ - Geospatial Data Types, B035-1181.