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
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

Although Teradata implements the geospatial data types ST_Geometry and MBR as UDTs, they 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.

IF a UDF needs … THEN pass the …
the entire representation of an ST_Geometry type in text format well-known text representation of the ST_Geometry value by calling the ST_AsText method.
the entire representation of an ST_Geometry type in binary format well-known binary representation of the ST_Geometry value by calling the ST_AsBinary method.
part of an ST_Geometry value, such as the X or Y coordinate of an ST_Point value by calling the appropriate method, such as ST_X or ST_Y.

For more information on geospatial types, including well-known text formats, well-known binary formats, methods, functions, and stored procedures, see Teradata Vantage™ - Geospatial Data Types, B035-1181.