GET /distance/betweenPairs.{outputFormat}

gov.bc.ca:router

Summary: Get distance and travel time between each pair of geographic points
Operation ID:
Auth: unknown
Description

Represents the distance and time of the shortest or fastest paths between all pairs of fromPoints and toPoints. The number of fromPoints times the number of toPoints should not exceed 100 or the request will time out.

Parameters (11)

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']}

fromPoints (string, query, required)

A comma-separated list of origin points. See <a href=https://github.com/bcgov/ols-router/blob/gh-pages/glossary.md#fromPoints target='_blank'>fromPoints</a>

maxPairs (integer, query, optional)

The maximum number of pairs to return for each toPoint. Pairs are ordered by distance/time from fromPoint. For example, given 1 fromPoint, and 10 toPoints, and maxPairs=1 , return the nearest toPoint to the fromPoint. Given 3 fromPoints and 10 toPoints, maxPairs=3 means return the 3 nearest toPoints to each fromPoint.

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

Format of representation

Constraints: {'enum': ['json', '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]}

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

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

toPoints (string, query, required)

A comma-separated list of destination points. See <a href=https://github.com/bcgov/ols-router/blob/gh-pages/glossary.md#toPoints target='_blank'>toPoints</a>

No probe data for this endpoint yet.