GET /matrix

graphhopper.com

Summary: GET Matrix Endpoint
Operation ID: getMatrix
Auth: unknown
Description

With this Matrix Endpoint you submit the points and parameters via URL parameters and is the most convenient as it works out-of-the-box in the browser. If possible you should prefer using the [POST Matrix Endpoint](#operation/postMatrix) that avoids problems with many locations and can also gzip the **request**. (Note, that all endpoints return gzipped responses).

Parameters (14)

curbside (array, query, optional)

Optional parameter. It specifies on which side a point should be relative to the driver when she leaves/arrives at a start/target/via point. You need to specify this parameter for either none or all points. Only supported for motor vehicles and OpenStreetMap.

fail_fast (boolean, query, optional, default: True)

Specifies whether or not the matrix calculation should return with an error as soon as possible in case some points cannot be found or some points are not connected. If set to `false` the time/weight/distance matrix will be calculated for all valid points and contain the `null` value for all entries that could not be calculated. The `hint` field of the response will also contain additional information about what went wrong (see its documentation).

from_curbside (array, query, optional)

Curbside setting for the from_point parameter. See curbside.

from_point (array, query, optional)

The starting points for the routes in `latitude,longitude`. E.g. if you want to calculate the three routes A->1, A->2, A->3 then you have one from_point parameter and three to_point parameters.

from_point_hint (array, query, optional)

For the from_point parameter. See point_hint

out_array (array, query, optional)

Specifies which arrays should be included in the response. Specify one or more of the following options 'weights', 'times', 'distances'. To specify more than one array use e.g. out_array=times&out_array=distances. The units of the entries of distances are meters, of times are seconds and of weights is arbitrary and it can differ for different vehicles or versions of this API.

point (array, query, optional)

Specify multiple points in `latitude,longitude` for which the weight-, route-, time- or distance-matrix should be calculated. In this case the starts are identical to the destinations. If there are N points, then NxN entries will be calculated. The order of the point parameter is important. Specify at least three points. Cannot be used together with from_point or to_point.

point_hint (array, query, optional)

Optional parameter. Specifies a hint for each `point` parameter to prefer a certain street for the closest location lookup. E.g. if there is an address or house with two or more neighboring streets you can control for which street the closest location is looked up.

snap_prevention (array, query, optional)

Optional parameter to avoid snapping to a certain road class or road environment. Current supported values `motorway`, `trunk`, `ferry`, `tunnel`, `bridge` and `ford`. Multiple values are specified like `snap_prevention=ferry&snap_prevention=motorway`

to_curbside (array, query, optional)

Curbside setting for the to_point parameter. See curbside.

to_point (array, query, optional)

The destination points for the routes in `latitude,longitude`.

to_point_hint (array, query, optional)

For the to_point parameter. See point_hint

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

Specifies if turn restrictions should be considered. Enabling this option increases the matrix computation time. Only supported for motor vehicles and OpenStreetMap.

vehicle (?, query, optional)

The vehicle profile for which the matrix should be calculated.

No probe data for this endpoint yet.