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.