---
title: "travel mode from points · RUAL Documentation"
description: "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…"
canonical: https://docs.rual.nl/block-types/geopoint/geo_point_travel_mode
language: en
---

# travel mode from points

This block is part of the [`geopoint`](https://docs.rual.nl/block-types/geopoint) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

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).

- 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`

- 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](https://docs.rual.nl/block-types/geopoint/geo_point_travel_mode): [number](https://docs.rual.nl/block-types/number/number_default) feeds the `max_distance` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `type` pin; [with values](https://docs.rual.nl/block-types/array/array_of_values) feeds the `geo_points` pin; the `on_road` out pin feeds [AND](https://docs.rual.nl/block-types/condition/condition_and).

![Studio canvas example for the travel mode from points block: typical wiring for travel mode from points.](https://docs.rual.nl/canvas-examples/geo_point_travel_mode.png)

### Commonly used with

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

- [return](https://docs.rual.nl/block-types/function%20execution/function_return): this block feeds into it. Returns the added custom pins as data-pins on the function execute.

- [AND](https://docs.rual.nl/block-types/condition/condition_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](https://docs.rual.nl/block-types/number/number_default): feeds into this block. Generates a valid number from the filled custom value in the blueprint.

- [execute](https://docs.rual.nl/block-types/function%20execution/function_custom_execute): feeds into this block. Executes the given funcion and waits for it to be executed.

- [value](https://docs.rual.nl/block-types/value/value_default): feeds into this block. Simply returns the provided value.

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
