This web service allows you to define optimum routes while minimising travel times and distances. The ordering of points to visit is optimized on the basis of geographic and operational constraints (time slots, duration of the visit…).
{ "url":"https://api.geoconcept.com/EU/GCW/geoconcept-web/api/lbs/optim/route/v4.json", "method":"POST", "body": { "origin": { "x": 2.33906, "y": 48.84467, "id": "1", "duration": 600000, "timeWindows": [ { "start": 0, "end": 3600000 } ] }, "destination": { "x": 2.37125, "y": 48.82769, "id": "5", "duration": 600000 }, "steps": [ { "x": 2.32792, "y": 48.81033, "id": "2", "duration": 600000, "timeWindows": [ { "start": 360000, "end": 7200000 } ] }, { "x": 2.35373, "y": 48.83176, "id": "3", "duration": 600000 }, { "x": 2.32453, "y": 48.80319, "id": "4", "duration": 600000 } ], "method": "TIME", "matrixProvider": "SMARTROUTING", "srs": "wgs84" } }
Input
parameter | description | optional | default |
---|---|---|---|
origin (optimRouteStep) |
origin point (id,x,y) |
yes |
|
destination (optimRouteStep) |
destination point (id,x,y) |
yes |
|
steps (Array of optimRouteStep) |
points to visit (id,x,y;id,x,y;…) |
no |
|
method |
shortest (distance) or fastest (time) route |
yes |
time |
configName |
Name of the configuration to use: |
yes |
|
snapMethod |
Snap to graph method |
yes |
standard |
exclusions |
List of restriction rules to use, separated by the ; character |
yes |
|
startDateTime |
Start date and time (format ISO8601: local time) example: 2014-01-21T09:00:00.000+01:00 (or 2014-01-21T09:00:00.000%2B01:00) for a start on 21 January 2014, at 9.00am in Paris |
yes |
|
avoidArea |
Forbidden transit zone in WKT format (POLYGON or MULTIPOLYGON) in the requested projection (srs parameter) |
yes |
|
timeLine |
List of intermediate durations to calculate positions along the route trajectory. Expressed in seconds, separated by the ; character |
yes |
|
snapMethod |
Snap to graph method |
yes |
standard |
computeOptions |
Selection of variables to use in calculations, using semi-colons ; as separators: |
yes |
|
matrixProvider |
matrix calculation provider |
yes |
smartrouting |
matrix |
time/distance matrix (id1,id2,time,distance;…) |
yes |
|
srs |
projection (EPSG code such as epsg:4326 or wgs84) |
yes |
wgs84 |
directSpeed |
Default speed during utilisation of globe or euclidean matrices |
yes |
50 |
Steps (optimRouteStep)
parameter | type | min/max | description | optional | default |
---|---|---|---|---|---|
x |
double |
1/1 |
Longitude of the step |
no |
|
y |
double |
1/1 |
Latitude of the step |
no |
|
id |
string |
0/1 |
ID of the step |
no |
|
duration |
long |
1/1 |
duration of a visit, in milliseconds |
yes |
0 |
timeWindows |
Array of optimTimeWindow |
1/1 |
Time windows |
yes |
Time windows (optimTimeWindow)
parameter | type | min/max | description | optional | default |
---|---|---|---|---|---|
start |
long |
1/1 |
Start of the time window, in milliseconds |
no |
|
end |
long |
1/1 |
Time window end, in milliseconds |
no |
Output
parameter | type | min/max | description |
---|---|---|---|
steps/step |
Array of optimRouteStepOut |
0/unlimited |
List of the ordered steps |
distanceMeters |
long |
1/1 |
Total journey distance in meters |
durationSeconds |
long |
1/1 |
Total journey time in seconds |
unreachableSteps |
array (OptimUnreachableStep) |
0/unlimited |
List of steps not reachable |
Steps (optimRouteStepOut)
parameter | type | min/max | description |
---|---|---|---|
id |
string |
0/1 |
ID of the step |
x |
double |
1/1 |
Longitude of the step |
y |
double |
1/1 |
Latitude of the step |
duration |
long |
1/1 |
Duration of the step |
effectiveStart |
long |
1/1 |
Effective start time of the step, in milliseconds |
driveDistanceBefore |
int |
1/1 |
Drive time before the step, in meters |
driveDistanceAfter |
int |
1/1 |
Drive distance after the step, in meters |
driveTimeBefore |
long |
1/1 |
Drive time before the step, in milliseconds |
driveTimeAfter |
long |
1/1 |
Drive time after the step, in milliseconds |
timeWindows |
Array of optimTimeWindowOut |
1/1 |
Time windows |
Time windows (optimTimeWindowOut)
parameter | type | min/max | description |
---|---|---|---|
start |
long |
1/1 |
Time window start, in milliseconds |
end |
long |
1/1 |
Time window end, in milliseconds |
List of steps not reachable (OptimUnreachableStep)
paramètre | type | min/max | description |
---|---|---|---|
id |
string |
1/1 |
ID of the step |
x |
double |
1/1 |
Longitude of the step |
y |
double |
1/1 |
Latitude of the step |
Case of an optimization applied successfully
{ "steps": [ { "x": 2.33906, "y": 48.84467, "id": "1", "duration": 600000, "effectiveStart": 0, "driveDistanceBefore": 0, "driveDistanceAfter": 5057, "driveTimeBefore": 0, "driveTimeAfter": 737740, "timeWindows": [ { "start": 0, "end": 3600000 }, [...] ] }, [...] ], "distanceMeters": 13502, "durationSeconds": 2015 }
- 1. Can you force a start and/or arrival step in the calculation of a route?
- 2. How can you specify, for each step, a visit duration and a visit time window?
- 3. What are the exclusions available?
- 4. What are the Hazardous material exclusions?