STS_GetTimesPassedByPoint function

The STS_GetTimesPassedByPoint function is an iterative function and returns all the times within a time range when an object is near the specified position.

Syntax 1

STS_GetTimesPassedByPoint(
                        ts           TimeSeries,
                        begin_time   DATETIME YEAR TO FRACTION(5),
                        end_time     DATETIME YEAR TO FRACTION(5),
                        point        ST_Point)
returns DATETIME YEAR TO FRACTION(5)
ts
The name of the time series.
begin_time
The start of the time range. Can be NULL to indicate the first element in the time series.
end_time
The end of the time range. Can be NULL to indicate the last element in the time series.
Point
An ST_Point for the position of interest.

Syntax 2

STS_GetSetOfTimesPassedByPoint(
                        ts           TimeSeries,
                        begin_time   DATETIME YEAR TO FRACTION(5),
                        end_time     DATETIME YEAR TO FRACTION(5),point ST_Point,
                        radius       FLOAT)
returns DATETIME YEAR TO FRACTION(5)
ts
The name of the time series.
begin_time
The start of the time range. Can be NULL to indicate the first element in the time series.
end_time
The end of the time range. Can be NULL to indicate the last element in the time series.
point
An ST_Point for the position of interest.
radius (Optional)
The distance from the point that defines the border of the region of interest.

Syntax 3

STS_GetSetOfTimesPassedByPoint(
                        ts           TimeSeries,
                        begin_time   DATETIME YEAR TO FRACTION(5),
                        end_time     DATETIME YEAR TO FRACTION(5),point ST_Point,
                        radius       FLOAT,
                        uom          VARCHAR(128))
returns DATETIME YEAR TO FRACTION(5)
ts
The name of the time series.
begin_time
The start of the time range. Can be NULL to indicate the first element in the time series.
end_time
The end of the time range. Can be NULL to indicate the last element in the time series.
point
An ST_Point for the position of interest.
radius (Optional)
The distance from the point that defines the border of the region of interest.
uom (Optional)

The unit of measure for the radius parameter. Default is meters. Must be the name of a linear unit of measure from the unit_name column of the st_units_of_measure table.

Usage

Run the STS_GetTimesPassedByPoint function to return all the times within a time range when an object is near the specified position.

Returns

Returns the times that the vehicle passed near the specified point in as rows instead of a set.

Example

SELECT * from table(STS_GetTimesPassedByPoint((select ts_track from t_vehicle where modid =’1’),
'2017-02-02 13:00:00', '2017-02-02 13:03:30', 
ST_Point(116.401, 39.911, 4326), 100));

2017-02-02 13:00:20.00000
2017-02-02 13:00:43.00000
2017-02-02 13:01:16.00000

Copyright© 2019 HCL Technologies Limited