Question

Merge two features on epochtime with in-range time comparison in milliseconds

  • 21 November 2019
  • 1 reply
  • 0 views

Hello,

 

I have one dataset, the epoch time on that is approx. 5Hz

I have another dataset with epoch time and that is in 20Hz, it covers several different 5Hz datasets

These two features do not share a perfect match in milliseconds.

I want to merge the 5Hz attributes to the geometry of the 20Hz. NeighborFinder does not work since the 20Hz has geometry from several different datasets in close proximity.

Both datasets contain timestamps which merges succesfully in FeatureMerger, however these matches are sporadic.

I cannot round the milliseconds to more than 3 decimals, since that will degrade the solution of the 20Hz.

I was thinking of an inlinequery with an SQL query that performs an epoch timematch based on a 0.005 second in range since that would be the unique identifier. However I do not know how to fully structure such a query.

 

Regards,

Robin


1 reply

Badge +10

If you create from and to attributes on the output based on the milliseconds plus/minus 0.005 you can then use an inlinequerier with something like

SELECT
    a."seconds",a.id, b.seconds, b.id
FROM
    Table1 a
    JOIN Table2 b
        ON b."seconds" BETWEEN a."from" AND a."to"

Reply