Learn how to synchronize timestamps of two Geo Time Series and copy the locations from one to the other.
Imagine that we have a reference series without geolocation (called "reference") and a second series with geolocalized data (called "dummy").
We would like to copy the location of datapoints of the second series to the reference series, but there is no timestamps in common.
Random data generation
At first, for this blog post, we will generate random data:
NEWGTS 'reference' RENAME 1 10 <% 'index' STORE NOW RAND 100 * STU * - TOLONG // timestamp NaN NaN NaN // lat long elevation $index TOSTRING // value ADDVALUE %> FOR 'reference' STORE
NEWGTS 'dummy' RENAME 1 100 <% 'index' STORE NOW RAND 100 * STU * - TOLONG // timestamp 48.2 RAND + -4.3 RAND + NaN // lat long elevation $index // value ADDVALUE %> FOR 'dummy' STORE
The data process consists on:
- Fill the "dummy " GTS with timestamps coming from the "reference" GTS
- Interpolate values and locations for those new datapoints
- Copy the geolocation from "dummy" to "reference"
$reference $dummy filler.interpolate FILL COPYGEO
To sum up, the full code sample is here: https://snapshot.senx.io/0005a003e8f911c3-0-4-4858676921776908
More info about:
Senior Software Engineer
Parse and transform values on the fly using WarpScript macros as they are pushed to your Warp 10 instance. Discover this feature via protobuf serialization.
Get to know the Warp 10 Directory and discover functions which query it.