v1

latestOpenAPI 3.0.02026-07-241437122.4 KB
Routing

Optimize Service

Optimize API solves the Traveling Salesman Problem(TSP) using a greedy heuristic (farthest-insertion algorithm) for 10 or more waypoints and uses brute force for less than 10 waypoints. The returned path does not have to be the fastest path. As TSP is NP-hard it only returns an approximation. Note that all input coordinates have to be connected for the optimize service to work.

get/optimize/{profile}/{coordinates}

Query parameters

bearingsstring

Limits the search to segments with given bearing in degrees towards true north in clockwise direction. List of positive integer pairs separated by semi-colon and bearings array should be equal to length of coordinate array. Accepted Value :- {bearing};{bearing}[;{bearing} ...] Each {bearing} follows the following format: {value},{range} integer 0 .. 360,integer 0 .. 180

radiusesstring

Limits the search to given radius in meters Radiuses array length should be same as coordinates array, each value separated by semi-colon. Accepted Value - {radius};{radius}[;{radius} ...] Each {radius} has following format: double >= 0 or unlimited (default)

hintsstring

Hint from previous request to derive position in street network. Accepted value: {hint};{hint}[;{hint} ...]

roundtripstring

Returned route is a roundtrip (route returns to first location) . Accepted value: true (default), false

sourcestring

Returned route starts at any or first coordinate. Accepted value: any (default), first.

destinationstring

Returned route ends at any or last coordinate. Accepted value: any (default), last.

stepsstring

Returned route steps for each route leg. Accepted value: true, false (default)

annotationsstring

Returns additional metadata for each coordinate along the route geometry. Accepted value: true, false (default), nodes, distance, duration, datasources, weight, speed

geometriesstring

Returned route geometry format (influences overview and per step). Accepted value: polyline (default), polyline6, geojson

overviewstring

Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all. Accepted value: simplified (default), full, false

Response

OK

codestring

If the request was successful Ok otherwise see the service dependent and general status codes.