17.10 - Return Type - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Geospatial Data Types

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1181-171K
Language
English (United States)

The GeometryToRows table operator returns an eight or nine column table with the following columns.

Column Name Description
Geometry object

identifier column

The value of the input id1 argument, which is passed directly to the output of the GeometryToRows operator. Identifies the points that are returned for a particular input geometry. The type of this column matches the type of id1 in the input table.

If the SELECT statement that uses the table operator does not specify a column list in the AS clause, the name of this column matches the name of the id1 argument to the table operator.

Optional second

geometry object

identifier column

If the input table included an id2 column to further identify the input geometry objects, that value is passed through the table operator and appears in a second column in the returned table. The this column matches the type of id2 in the input table.

If the input table does not have an id2 column, there is no corresponding column in the table returned by the GeometryToRows table operator.

element_id An INTEGER value that identifies the particular component element of a Multi type geometry to which the point represented by this row belongs. Individual elements in a Multi geometry are numbered starting from 1.

For example, if a MutliLineString contains two LineStrings, the points for the first LineString will have an element_id of 1 and the points from the second LineString will have an element_id of 2.

LineString will have an element_id of 2.

ring_id An INTEGER value that identifies the particular polygon ring of a Polygon or MultiPolygon to which the point represented by this row belongs. Individual rings for a polygon are numbered starting from1, with the exterior ring being number 1, and the interior rings numbered starting from 2.

If the geometry object is not a Polygon or MultiPolygon, the ring_id will be set to NULL.

point_id An INTEGER value that reflects the ordering of the point within the geometry. point_id numbering starts with 1. The points for each geometry are numbered in the order in which they occur within the geometry.
geomType The geometry type of the input geometry. The possible values are ST_Point, ST_MultiPoint, ST_LineString, ST_MultiLineString, ST_Polygon, or ST_MultiPolygon. If the input geometry is NULL, this value will be NULL. The data type of this value is VARCHAR(30) CHARACTER SET LATIN.
x The x coordinate value for the point represented by the row. This is a DOUBLE PRECISION value.

If the input geometry is an empty set, this value is NULL.

y The y coordinate value for the point represented by the row. This is a DOUBLE PRECISION value.

If the input geometry is an empty set, this value is NULL.

z The z coordinate value for the point represented by the row. This is a DOUBLE PRECISION value.

If the geometry is a 2D geometry, or if the input geometry is an empty set, this value is NULL.