STS_GetNumberOfTimesPassedByPoint function
The STS_GetNumberOfTimesPassedByPoint function returns the number of times within a time range when an object is near the specified position.
Syntax 1
STS_GetNumberOfTimesPassedByPoint(
ts TimeSeries,
begin_time DATETIME YEAR TO FRACTION(5),
end_time DATETIME YEAR TO FRACTION(5),point ST_Point)
returns INTEGER
- 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.
Syntax 2
STS_GetNumberOfTimesPassedByPoint(
ts TimeSeries,
begin_time DATETIME YEAR TO FRACTION(5),
end_time DATETIME YEAR TO FRACTION(5),point ST_Point,
radius FLOAT)
returns INTEGER
- 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.
- radius (Optional)
- The distance from the point that defines the border of the region of interest.
Syntax 3
STS_GetNumberOfTimesPassedByPoint(
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 INTEGER
- 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.
- 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_GetNumberOfTimesPassedByPoint function to find out the number of times within a time range when an object is near the specified position.
Returns
Returns the number of times that a vehicle passed near the specified point.
Example
SELECT STS_GetNumberOfTimesPassedByPoint(ts_track, '2017-02-02 13:00:00', '2017-02-02 13:03:30',
ST_Point(116.401, 39.911, 4326), 100)
FROM t_vehicle
WHERE modid='1';