Route calculation (batch)

Basic principles

This web service calculates a set of itineraries between two points and returns a for each a full route sheet. It is possible to add optional intermediate steps.

Route calculation example

{
        "url":"https://api.geoconcept.com/EU/GCW/geoconcept-web/api/lbs/route/batch.json",
        "method":"POST",
        "body": {
      "routeRequests": [
       {
          "origin":{
             "x":2.348,
             "y":48.853783
          },
          "destination":{
             "x":2.349,
             "y":48.854
          },
          "srs":"epsg:4326",
          "configName":"car",
          "format":"summary"
       },
       {
          "origin":{
             "x":-1.524361036,
             "y":47.23876778
          },
          "destination":{
             "x":-1.525361036,
             "y":47.23776778
          },
          "srs":"epsg:4326",
          "configName":"car",
          "format":"summary"
       }
      ]
    }
}

Parameters / properties

Input

parameter type optional description

routeRequests

array of RouteRequestV5

No

Table of routes as input.

timeOut

string

Yes

Time out value for computations (in milliseconds).

Routes as input (RouteRequestV5)

Detailed on Route calculation web service.

Output

parameter type min/max description

result

array of RouteResultV5

0/unlimited

The routes results

Routes results (RouteResultV5)

Detailed on Route calculation web service.

Possible returns

Case of a route found (routeResult/status is OK) 

{
    "message": null,
    "status": "OK",
    "results": [
        {
            "message": null,
            "status": "OK",
            "distance": "1.66 Km",
            "duration": "0:07:56",
            "distanceMeters": 1658.9,
            "durationSeconds": 476.69,
            "bounds": null,
            "wktGeometry": null,
            "wktSimplifiedGeometry": null,
            "compressedGeometry": null,
            "compressedSimplifiedGeometry": null,
            "legs": [
            ],
            "startDateTime": null,
            "finishDateTime": null,
            "srs": "epsg:4326",
            "originNode": null,
            "waypointNodes": null,
            "destinationNode": null,
            "carbonFootprint": null
        },
        {
            "message": null,
            "status": "OK",
            "distance": "159 m",
            "duration": "0:00:47",
            "distanceMeters": 158.76,
            "durationSeconds": 47.66,
            "bounds": null,
            "wktGeometry": null,
            "wktSimplifiedGeometry": null,
            "compressedGeometry": null,
            "compressedSimplifiedGeometry": null,
            "legs": [
            ],
            "startDateTime": null,
            "finishDateTime": null,
            "srs": "epsg:4326",
            "originNode": null,
            "waypointNodes": null,
            "destinationNode": null,
            "carbonFootprint": null
        }
    ]
}

See Route calculation web service.

FAQ

See Route calculation web service.