GET /optimalRoute.{outputFormat}

gov.bc.ca:router

Summary: Get the optimal path, distance and travel time between a start point and a series of end points which are reordered to minimize total distance or time.
Operation ID:
Auth: unknown
Description

Represents the geometry, distance, and time of the shortest or fastest path between a start point and a series of end points which are reordered to minimize distance or time

Parameters (10)

correctSide (boolean, query, optional, default: False)

If true, route starts and ends on same side of road as start and end points.Default is false.

criteria (string, query, optional, default: shortest)

Routing criteria to optimize (e.g., shortest, fastest). Default is shortest.

Constraints: {'enum': ['shortest', 'fastest']}

departure (string, query, optional)

departure date and time in internet timestamp notation as defined in RFC 3339, section 5.6 (e.g., 2019-02-28T11:36:00-08:00);<br> Ignored if time-dependency modules are disabled

disable (string, query, optional, default: sc,tf,ev,td)

A comma-separated list of time-related modules to disable (e.g., sc,tf,ev,td).<br><br>Module names include:<br> sc – ferry schedules; disabled by default; disabled by default and only suitable for demos<br>tf – historic traffic congestion; disabled by default and only suitable for demos<br>ev – road events; disabled by default and only suitable for demos<br>td – time-dependency; disabling this disables sc, tf, and ev modules<br>tr – turn restrictions; if td is disabled, time-dependent turn restrictions are ignored<br>tc - turn costs (e.g., left turns take longer than right turns)

distanceUnit (string, query, optional, default: km)

distance unit of measure (e.g., km, mi). Default is km.

Constraints: {'enum': ['km', 'mi']}

outputFormat (string, path, required, default: json)

Format of representation

Constraints: {'enum': ['json', 'kml', 'html']}

outputSRS (integer, query, optional, default: 4326)

The EPSG code of the spatial reference system (SRS) to use for output geometries. See <a href=https://github.com/bcgov/ols-router/blob/gh-pages/glossary.md#outputSRS target="_blank">outputSRS</a>

Constraints: {'enum': [4326, 4269, 3005, 26907, 26908, 26909, 26910, 26911]}

points (string, query, required)

A list of any number of route points in start to end order. See <a href=https://github.com/bcgov/ols-router/blob/gh-pages/glossary.md#points target='_blank'>points</a>

roundTrip (boolean, query, optional, default: False)

If true, route ends at start point. Default is false.

routeDescription (string, query, optional, default: Routing results)

Route description (e.g., Shortest route from 1002 Johnson St, Victoria to 1105 Royal Ave,New Westminster)

No probe data for this endpoint yet.