SpeedN Method | Geospatial Data Types | Teradata Vantage - 17.10 - SpeedN - 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)

Returns the approximate speed at a specified point (SpeedN(index INTEGER)) or between two points (SpeedN(iBegin INTEGER, iEnd INTEGER)) for a GeoSequence type.

Valid Data Types

GeoSequence

Result Type

Returns a FLOAT value.

IF you pass in … THEN …
iBegin and iEnd the speed is calculated as the distance between the two points (along the LineString) divided by the time between them.
index if the point is:
  • The first point, the distance between the first and second points is divided by the time between them.
  • The last point, the distance between the second to the last and last points is divided by the time between them.
  • Any other point, the distance between the previous point and the next point (along the LineString) is divided by the time difference between the previous point and the next point.

The units used for distance are the same units that are used by the coordinate system for the GeoSequence value, and the time units are in hours.