Geospatial · Geocoding and routing

Route

Works out the road route between each row's start and end point, with distance, travel time and the route line. By car, bicycle, foot or truck.

Also known as: Directions, drive distance

How it works

Pick the four columns that hold each row's start and end: Origin latitude, Origin longitude, Destination latitude and Destination longitude. Choose a Travel mode (Car by default, or Bike, Walk or Truck) and the Routing tiles to route on; the node runs offline against the tile set installed in the app. Every input column is kept and three are added: route_distance_m, route_duration_s and route_geometry, the road route as a line. A pair that cannot be routed leaves those columns NULL.

Inputs and outputs

Inputs

  • data — Table

Outputs

  • data — Table

Settings

The Attributes panel of Route, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  originLat: string
  originLon: string
  destLat: string
  destLon: string
  costing: "auto"|"bicycle"|"pedestrian"|"truck"
}

the four columns holding each row's start and end coordinates. Never emit tile-set ids or paths — the app selects the installed tile set itself.

Example

You have orders with the depot and the customer coordinates on each row. Set the origin columns to depot_lat and depot_lon, the destination columns to cust_lat and cust_lon, Travel mode to Truck, then Aggregate route_distance_m per driver.

orderroute_distance_mroute_duration_sroute_geometry
10428310742LINESTRING (...)
1043159201288LINESTRING (...)