Loading

MOTIONSPLIT


gts
Since v2.3.0
Available on all platforms
See also

The MOTIONSPLIT function splits Geo Time Series™ instances based on several possible motion criteria. Split parameters can be combined to split on multiple criteria.

MOTIONSPLIT can split on :

  • stopped state detection
  • moving to stopped transition
  • time difference between two ticks (just as TIMESPLIT does).
  • maximal distance between two consecutive positions.

MOTIONSPLIT parameters:

  • timesplit: LONG value, time in platform time unit. Splits if the time difference between two consecutive ticks is strictly greater than this parameter. If defined, the split type label will be "timesplit".
  • distance.split: DOUBLE value, distance in meter. Splits if the orthodromic distance between two consecutive locations is strictly greater than this parameter. If defined, the split type label will be "distancesplit".
  • stopped.min.time: LONG value, time in platform time unit. This is the minimum time the consecutive locations should stay in the stopped zone radius to consider a stop state. If defined, the split type label will be "stopped".
  • stopped.max.radius: DOUBLE value, distance in meter. As long as consecutive positions remains in the radius during stopped.min.time, MOTIONSPLIT detect a stopped state.
  • stopped.max.speed: DOUBLE value, speed in m/s. If the speed is greater than this value while in stopped state, MOTIONSPLIT exits the stopped state.
  • stopped.max.mean.speed: DOUBLE value, speed in m/s. Maximum mean speed in the proximity zone that prevent the split. MOTIONSPLIT will split only if there is a full stop during the given time and radius, and if the mean speed in the proximity zone is less than this parameter.
  • stopped.split: BOOLEAN value. If true, MOTIONSPLIT also splits between stopped and moving sequences. If defined, the split type label will be "stopped" or "moving".
  • label.stopped.time: STRING value. If defined, MOTIONSPLIT will add an extra label on each split that contains the time in stopped state. If the split source is not a stop detection, this label won't be set.
  • label.split.number: STRING value. If defined, MOTIONSPLIT will add an extra label on each split that contains the split number, starting from 1.
  • label.split.type: STRING value. If defined, MOTIONSPLIT will add an extra label that contains the split reason. It could be "timesplit", "distancesplit", "end", "stopped" or "moving".

MOTIONSPLIT split type priorities:

  • If stopped.min.time and stopped.max.radius are set, the stop detection has the first priority.
  • If MOTIONSPLIT does not detect a stopped state, it looks for a distance split.
  • If MOTIONSPLIT does not detect a stopped state or a distance split, it looks for a time split.

Signature

Examples

// run this example in warpStudio or VSCode to display the result on a map // @preview gts // tweak the parameters and check how MOTIONSPLIT will split a delivery truck record in Paris traffic. "60V7O5KgPMO_RbZQ.NV4S68pNqg5FIBlBKCH4V.L.0g..5Yo3WyA1..........KKb_RooRLCx6okslbJQFKl6eoKaepxLXfKGxeux3ILv0phxOUvLdMuxd2iiubqxJF979VJEl0i0jikoVF7VFA83.V6361_M.IkWp1.VX9388xzYiUaIUnjhTQHUStj7XHyj4YYjcC_lucSquboD1XUppqwaTLoRV6XUK8cFDovvWxfIoua5LHmuDcz3b5UA.RLTZPM6iKOJF0zfFiERFCK3hRjnzpqG2AOCwccZdxs7hVyLqAto2O1IkKo3VTlGbLFTzDlnaXxABgcuop33LPnFqub1ioxKp5_eZiBW84RGV4JtGgQEMLqmknNLoZ7JC0du68TvsEAniSOQeu8caad7m0pjrfUTW_jCqF8eKqsU.qgAnQ7KzynouLJHjmu9mEwWFN_7a_Rkajg7moL3Q_RQZAc2QzYIBMZWlNdazBIEYwwW48glgNxapwtNSnsxXgvkBe4edu_cAdx.TASsSiN0bnI.MlwvTjWUvmrQafgYlltNwXei5bM7HahQavkboRgSisRL9CubN0gxjYY5vW8dOt68O5OuC5_ZAQnjnNqOENjsaCc5K2FoysN2vMgfMT.tzOw2HEIjNZhay5PZrgjTPM1pb59asVjeLmO1oM28jUzEY7oGJgsuUM3eJVqF5BIbyDiYgUNWbOnF0ebGjWFNMhrzUyt1ETofNNmZQzHP5zwOIDyUFx_W335sXxIZx0MzK4SyTmzQY6K339FmNdC5Jzrqcnhv4Bh305vH324CcD1PvB5uxZ5M4P28qJ8E4.Rx1AEvvu9DsOg02U7IZETjwqia4ColbgEuaDnDdkGGSvxmnrRxmIEidEfQJAkOmVXFrTCsTM4zhHjY5AFcl4ZDxFmLROjY5P9V8qFJhgT4nChcogBxaOHOhoDWvoLz9iMEPdFhNuG2Gvc1yT1nxwPbfCyyht99ll7QL6EsfXFRDw5whub01Cm47WtHh9EkGIrUADBeSm_dZDXeHLux7po1WEA2lGBB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beoL20.tUl_N3bvXvDtTYHElUXsSgpXto0PoHuwQRBKOZS40C83LvAC6JevoUXjlztXbGToO1V..4e.13F." UNWRAP 'gts' STORE <% 3.6 / %> 'km/h' STORE $gts { 'timesplit' 10.95 s 'distance.split' 100 'stopped.min.time' 60 s 'stopped.max.speed' 10 @km/h 'stopped.max.radius' 80 'stopped.max.mean.speed' 5 @km/h 'label.split.number' 'split' 'label.split.type' 'reason' } MOTIONSPLIT
// run this example in warpStudio or VSCode to display the result on a map // @preview gts // tweak the parameters and check how MOTIONSPLIT will split a delivery truck record in Paris traffic. "60V7O5KgPMO_RbZQ.NV4S68pNqg5FIBlBKCH4V.L.0g..5Yo3WyA1..........KKb_RooRLCx6okslbJQFKl6eoKaepxLXfKGxeux3ILv0phxOUvLdMuxd2iiubqxJF979VJEl0i0jikoVF7VFA83.V6361_M.IkWp1.VX9388xzYiUaIUnjhTQHUStj7XHyj4YYjcC_lucSquboD1XUppqwaTLoRV6XUK8cFDovvWxfIoua5LHmuDcz3b5UA.RLTZPM6iKOJF0zfFiERFCK3hRjnzpqG2AOCwccZdxs7hVyLqAto2O1IkKo3VTlGbLFTzDlnaXxABgcuop33LPnFqub1ioxKp5_eZiBW84RGV4JtGgQEMLqmknNLoZ7JC0du68TvsEAniSOQeu8caad7m0pjrfUTW_jCqF8eKqsU.qgAnQ7KzynouLJHjmu9mEwWFN_7a_Rkajg7moL3Q_RQZAc2QzYIBMZWlNdazBIEYwwW48glgNxapwtNSnsxXgvkBe4edu_cAdx.TASsSiN0bnI.MlwvTjWUvmrQafgYlltNwXei5bM7HahQavkboRgSisRL9CubN0gxjYY5vW8dOt68O5OuC5_ZAQnjnNqOENjsaCc5K2FoysN2vMgfMT.tzOw2HEIjNZhay5PZrgjTPM1pb59asVjeLmO1oM28jUzEY7oGJgsuUM3eJVqF5BIbyDiYgUNWbOnF0ebGjWFNMhrzUyt1ETofNNmZQzHP5zwOIDyUFx_W335sXxIZx0MzK4SyTmzQY6K339FmNdC5J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7ddF2WjCXnD56jQTF_s4B_DuDsIT6rjuKOLlpJjeM8.5M9bE5flzZzsVuh2qVucG4Z89ZwYZZFcNQ6X_8YRxCz0L4Mx8jawCkIexM3vJiVkCbHvF_3TEE17pj8h9O6AnxH4jNqNET154wD8JAyYaF3GaeRjBMcK9HZn4VS0lcmiK95gUTkg6FLsR0swD0feWpXphKLUWAuBUoomo3IPp36QFb3fw7uJ4JJzov0yeEA1fQwFNDTp5lEtoCK6A0cZWUcneDbeoL20.tUl_N3bvXvDtTYHElUXsSgpXto0PoHuwQRBKOZS40C83LvAC6JevoUXjlztXbGToO1V..4e.13F." UNWRAP 'gts' STORE <% 3.6 / %> 'km/h' STORE $gts { 'stopped.min.time' 60 s 'stopped.max.speed' 10 @km/h 'stopped.max.radius' 80 'stopped.max.mean.speed' 5 @km/h 'stopped.split' true 'label.split.number' 'split' 'label.split.type' 'reason' } MOTIONSPLIT