ST_TRACKDURATION([unit,] t)
ST_TRACKDURATION([unit,] t)
Returns the total time, in the given
unit, spanned by timestamp values in column
t. Grouping by track ID will return the duration per track.The duration can be returned in any of the following date/time units:YEARMONTHDAYHOURMINUTESECONDMILLISECOND
unit is MILLISECOND.ST_TRACKLENGTH(lat, lon, t[, solution])
ST_TRACKLENGTH(lat, lon, t[, solution])
Returns the total length of the track whose position values are specified by
lat &
lon and whose ordering is determined by an ascending sort on the timestamp t.
Length can be returned with any of the following solution types:| Type | Description |
|---|---|
0 | 2D Euclidean length in degrees |
1 | (default) Length on a sphere in meters |
2 | Length on a spheroid in meters |
ST_TRACK_DWITHIN
TheST_TRACK_DWITHIN table function finds tracks that are related, within
spatial or temporal bounds (or both) to the given track(s). The track(s) to use
as the filter criteria will be specified by the SEARCH_* parameters. The
TRACK_* parameters specify the set of tracks to search through for a match.
This function is only available in SQL or in the native API via
/execute/sql.
ST_TRACK_DWITHIN function follows.
ST_TRACK_DWITHIN Table Function Syntax
TRACK_TABLE
TRACK_TABLE
Name of the table to search for tracks matching the track(s) specified in the To perform a search on the result of a query, pass the query to
SEARCH_* data set.To perform a search on the flights table, pass the name of the table to INPUT_TABLE:INPUT_TABLE:TRACK_ID_COLUMN
TRACK_ID_COLUMN
Table to search track column, containing the unique identifier for the track to which each track point
belongs.
TRACK_X_COLUMN
TRACK_X_COLUMN
Table to search track column, containing the longitude value of each track point.
TRACK_Y_COLUMN
TRACK_Y_COLUMN
Table to search track column, containing the latitude value of each track point.
TRACK_ORDER_COLUMN
TRACK_ORDER_COLUMN
Table to search track column, by which the searched track points will be sorted in ascending order.
SEARCH_TABLE
SEARCH_TABLE
Name of the search criteria track table, containing the track(s) to be used as the filter criteria
when searching for matching tracks in the To match tracks from the result of a query, pass the query to
TRACK_* data set.To match tracks from the flights_of_interest table, pass the name of the table to INPUT_TABLE:INPUT_TABLE:SEARCH_ID_COLUMN
SEARCH_ID_COLUMN
Search criteria track column, containing the unique identifier for the track to which each track point
belongs.
SEARCH_X_COLUMN
SEARCH_X_COLUMN
Search criteria track column, containing the longitude value of each track point.
SEARCH_Y_COLUMN
SEARCH_Y_COLUMN
Search criteria track column, containing the latitude value of each track point.
SEARCH_ORDER_COLUMN
SEARCH_ORDER_COLUMN
Search criteria track column, by which the filter track points will be sorted in ascending order.
SEARCH_XY_DISTANCE
SEARCH_XY_DISTANCE
The radius around the given tracks to search for matching tracks.
This parameter is not applicable when using a
SPATIAL_SOLUTION_TYPE of 0.| Unit | Description |
|---|---|
f | Feet |
ki | Kilometers |
m | (default) Meters |
mi | Miles |
SPATIAL_SOLUTION_TYPE
SPATIAL_SOLUTION_TYPE
Spatial match solution type; any of the following:
| Type | Description |
|---|---|
0 | (default) 2D Euclidean length in degrees |
1 | Length on a sphere, returned in units specified by SEARCH_XY_DISTANCE |
2 | Length on a spheroid, returned in units specified by SEARCH_XY_DISTANCE |
SEARCH_TIME_DISTANCE
SEARCH_TIME_DISTANCE
The maximum allowable time difference between a search criteria track’s point and a matched track’s
points. The time can use any of the following suffices for units:
| Unit | Description |
|---|---|
ms | Milliseconds |
s | (default) Seconds |
m | Minutes |
h | Hours |
d | Days |
w | Weeks |
months | Months |
y | Years |
ST_TRACK_DWITHIN Example
ST_TRACKINTERSECTS
TheST_TRACKINTERSECTS table function finds tracks pass through the given
geofence(s). The geofence(s) use as the filter will be specified by the
GEOFENCE_* parameters. The TRACK_* parameters specify the set of
tracks to search through for any intersecting the geofence(s).
The result will include a record for each intersecting track & geofence pair,
with:
- a
LINESTRINGrepresenting the full track intersecting a geofence - a
LINESTRINGrepresenting the geofence it intersected
This function is only available in SQL or in the native API via
/execute/sql.
ST_TRACKINTERSECTS function follows.
ST_TRACKINTERSECTS Table Function Syntax
TRACK_TABLE
TRACK_TABLE
Name of the table to search for tracks intersecting the geofence(s) specified in the To perform a search on the result of a query, pass the query to
SEARCH_* data
set.To perform a search on the flights table, pass the name of the table to INPUT_TABLE:INPUT_TABLE:TRACK_ID_COLUMN
TRACK_ID_COLUMN
Table to search track column, containing the unique identifier for the track to which each track point
belongs.
TRACK_X_COLUMN
TRACK_X_COLUMN
Table to search track column, containing the longitude value of each track point.
TRACK_Y_COLUMN
TRACK_Y_COLUMN
Table to search track column, containing the latitude value of each track point.
TRACK_ORDER_COLUMN
TRACK_ORDER_COLUMN
Table to search track column, by which the searched track points will be sorted in ascending order.
GEOFENCE_TABLE
GEOFENCE_TABLE
Name of the geofence table, containing the WKT(s) to be used as the filter criteria when searching for
intersecting tracks in the To search for tracks intersecting the geofence(s) from the result of a query, pass the query to
TRACK_* data set.To search for tracks intersecting the geofence(s) from the flight_area_of_interest table, pass the
name of the geofence table to INPUT_TABLE:INPUT_TABLE:GEOFENCE_ID_COLUMN
GEOFENCE_ID_COLUMN
Geofence column, containing the unique identifier for the geofence.
GEOFENCE_WKT_COLUMN
GEOFENCE_WKT_COLUMN
Geofence column, containing the WKT bounds of the geofence.
ST_TRACKINTERSECTS Example