15.10 - HeadingN - Teradata Database

Teradata Database SQL Geospatial Types

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1181-151K

Returns the heading for the specified point of a GeoSequence.

 

Argument …

Specifies …

index

the index of the point to return the heading of, where the index of the first point in the GeoSequence is 1.

The data type of index is INTEGER.

Returns a FLOAT value. The value is calculated as the angle (in degrees) between a vertical line and the line segment from the specified point to the next point clockwise from the North.

GeoSequence

CREATE TABLE sample_shapes(skey INTEGER, shape ST_Geometry);
 
INSERT INTO sample_shapes ( 100,'GeoSequence( (10 10, 15 15, -2 0) ,(2007-03-14 01:35:00, 2007-03-14 01:35:05, 2007-03-14 01:35:08),(1222, 1223, 1224),(2, 12.1, 3.14159, 2.78128, -10, -11, 100.1))' );
 
   SELECT skey
   FROM sample_shapes
   WHERE ((shape.HeadingN(2)) < 3.8e2)
   ORDER BY skey;