travel mode from points

This block is part of the geopoint group and was last modified in core v15.0.0.

travel mode from points v15.0.0

Classifies which network a series of GPS points is travelling on (road pinning): when at least min ratio of the points lie within max distance of a road or railway, the traveller is pinned to that network : e.g. the last 5 fixes near a road means driving, near a railway means riding a train. When both networks qualify the one with the smaller mean distance wins. Outputs the mode (road, rail or none), per-network conditions, the match confidence and the points snapped onto the matched network. A single geo point object is accepted as well; entries without numeric lat/lon are ignored. Offline lookup against the road/rail network (Benelux, OpenStreetMap).

In pins 4
  • geo points required
    array

    recent GPS points to classify, e.g. the last 5 fixes of a user; a single geo point object is also accepted

  • type
    value

    network to test against: auto (road vs rail), road or rail

    Default auto

  • max distance
    number

    maximum distance in metres for a point to count as on the network

    Default 50

  • min ratio
    number

    fraction of the points (0..1) that must be within max distance to match

    Default 0.8

Out pins 8
  • mode
    value

    detected travel mode: road, rail or none

  • on road
    condition

    true when the points match the road network (driving)

  • on rail
    condition

    true when the points match the rail network (riding a train)

  • confidence
    number

    fraction of the points within max distance of the matched network

  • mean distance
    number

    mean distance in metres from the points to the matched network

  • snapped points
    array

    the points pinned onto the matched network, in input order: lat, lon, snapped, distance

  • success
    condition
  • error
    value

A typical wiring for travel mode from points: number feeds the max_distance pin; value feeds the type pin; with values feeds the geo_points pin; the on_road out pin feeds AND.

Studio canvas example for the travel mode from points block: typical wiring for travel mode from points.

Commonly used with

In production blueprints, this block is most often wired together with:

  • return: this block feeds into it. Returns the added custom pins as data-pins on the function execute.
  • AND: this block feeds into it. operator for a set of boolean operands will be true if and only if all the operands are true.
  • number: feeds into this block. Generates a valid number from the filled custom value in the blueprint.
  • execute: feeds into this block. Executes the given funcion and waits for it to be executed.
  • value: feeds into this block. Simply returns the provided value.

Version history

Introduced in v15.0.0.


Back to geopoint Return to the main group to view all sub-groups Back to Geopoint Return to the group to view all blocks within this group