...
You can also align the prediction time interval at the end timestamp of the stream time. This can be done with alignAtEnd = true
.
Temporalization
TextTo work with temporal attributes, you need to have some in your stream. There are multiple ways to create temporal attributes.
Code Block |
---|
/// Convert the wh-attribute to a temporal double temporalize = AGGREGATION({ aggregations = [['function' = 'ToTemporalDouble', 'input_attributes' = 'wh', 'output_attributes' = 'temp_wh']], group_by = ['id'], eval_at_outdating = false },time) |
...
Code Block |
---|
/// Temporalize the location attribute temporalize = AGGREGATION({ aggregations = [['function' = 'TOLINEARTEMPORALPOINT', 'input_attributes' = 'SpatialPoint', 'output_attributes' = 'temp_SpatialPoint']], group_by = ['id'], eval_at_outdating = false }, createSpatialObject) |
Text
Code Block |
---|
/// The known trajectory
input_traj = ACCESS({
source='Source',
wrapper='GenericPull',
transport='File',
protocol='Text',
datahandler='Tuple',
metaattribute = ['TimeInterval', 'PredictionTimes'],
options=[
['filename', '/home/tobi/dev/odysseus_workspace/phd-workspace/Moving Object/Basic Queries/predefinedTrajectory/temporalGeoJson.txt'],
['Delimiter', ';']
],
schema=[['data', 'String']]
})
json = MAP({
expressions = [['FromTemporalGeoJson(data)','tempTrajectory']]
},input_traj) |
Map
Text
Select
Text
Join
Text
...