Waypoint sequence

Basic principles

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…).

Optimization example

{
        "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"
    }
}

Parameters / properties

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;…)
Several slots for visiting times in milliseconds can be specified for each point: (id,x,y,start, finish)

no

method

shortest (distance) or fastest (time) route

yes

time

configName

Name of the configuration to use:
- bicycle (not available for Japan)
- bus
- car
- delivery light vehicle
- delivery truck vehicle
- emergency truck
- emergency vehicle
- pedestrian (not available for Japan)
- taxi
- truck

yes

snapMethod

Snap to graph method
- standard: to the nearest connectable road segment
- extended: via restricted road sections (pedestrian routes…)
- nearest: to the nearest road section only
- unrestricted: without any restriction rules - nodes: snap directly to nodes supplied by the originNode originNode, destinationNode and waypointNodes parameters or, if these first ones are not filled, snap directly to the nearest nodes origin, destination and waypoint parameters.

yes

standard

exclusions

List of restriction rules to use, separated by the ; character
Available exclusion rules:
- Toll
- Infrastructure (Tunnel, Bridge)
- Hazardous material (Flammable, Dangerous, Pollutant, Toxic)
- ZFE (Zone à faible émission, France-only) - …
- Detailled list available on the FAQ bellow.

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)
Example in wgs84: POLYGON ((-1.556892 47.21689, -1.556892 47.216904, [...] -1.556892 47.21689)) - MULTIPOLYGON (((-1.556892 47.21689, -1.556892 47.216904, [...] -1.556892 47.21689)), ((-1.558639 47.218144, -1.558639 47.218193, [...] -1.558639 47.218144)))
Care: WKT geometries must be closed.

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
- standard: to the nearest connectable road segment
- extended: via restricted road sections (pedestrian routes…)
- nearest: to the nearest road section only
- unrestricted: without any restriction rules - nodes: snap directly to nodes supplied by the originNode originNode, destinationNode and waypointNodes parameters or, if these first ones are not filled, snap directly to the nearest nodes origin, destination and waypoint parameters.

yes

standard

computeOptions

Selection of variables to use in calculations, using semi-colons ; as separators:
- speedPattern: utilization as a speed pattern. Use: "speedPattern:slow-speed"
- length: maximum authorised length in centimeters. Use: "length:950"
- width: maximum authorised width in centimeters. Use: "width:255"
- height: maximum authorised height in centimeters. Use: "height:360"
- weight: maximum authorised weight in kilograms. Use: "weight:18000"
- axles: maximum authorised number of axels. Use: "axles:2"
- weightPerAxle: maximum authorised weight per axel in kilograms. Use: "weightPerAxle:9000"
- fuelType: fuel type used to calculate carbon footprint for the journey. Available values are: "UndefinedFuelType", "NoFuel", "Diesel", "UnleadedFuel", "LGP", "CustomFuelType" and "Electrical". Use: "fuelType:Diesel"
- averageConsumption: average consumption in litres for 100 kilometers or Wh per kilometers if electrical vehicle. Use: "averageConsumption:6.45"
- cityAverageConsumption: average consumption value in city mode, in litres per 100 kilometers, or Wh per kilometers if electrical vehicle. Use: "cityAverageConsumption:4.65"
- combinedAverageConsumption: average consumption value in combined mode, in litres per 100 kilometers, or Wh per kilometers if electrical vehicle. Use: "combinedAverageConsumption:5.12"
- highwayAverageConsumption: average consumption value in highway mode, in value in litres per 100 kilometers, or Wh per kilometers if electrical vehicle. Use: "highwayAverageConsumption:5.64" - customAverageCO2UnitEmission: defines the carbon footprint in kilograms per litre. Use: "customAverageCO2UnitEmission:2.724"
- snapSpeed: snap-to-graph speed in kilometers per hour. Use: "snapSpeed:10"

yes

matrixProvider

matrix calculation provider
- globe: as the crow flies on the globe (the coordinates must be in long/lat)
- euclidean: as the crow flies on the map (the coordinates must be in meters)
- smartrouting: calculation on the road network by SmartRouting
- provided: matrix parameter

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

Possible returns

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
}

FAQ

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?

1.

Can you force a start and/or arrival step in the calculation of a route?

Yes, you just have to use the origin and / or destination parameters respectively. The journey between the steps route stops is optimized taking into account any operational constraints, and without taking into account any logistical constraint (departure from home, arrival in a depot, ..;).

2.

How can you specify, for each step, a visit duration and a visit time window?

using the duration parameter (to indicate the duration set aside for a visit) and the timeWindowStart and timeWindowEnd parameters (to specify the start and finish time for a visit).

3.

What are the exclusions available?

See list below:

Exclusion Description

Toll

if added on exclusions toll road sections are not used.

BoatFerry

if added on exclusions ferry itineraries (shipping) over water are not used.

RailFerry

if added on exclusions ferry (or train) itineraries (over water and land respectively) are not used.

Tunnel

if added on exclusions tunnels are not used.

Bridge

if added on exclusions bridges are not used.

Frontage

if added on exclusions Frontage roads (local roads running parallel to a higher-speed, limited-access road) are not used.

Paved

if added on exclusions tarmac road sections are not used.

Private

if added on exclusions road sections for which maintenance is provided by a private organization are not used.

Pedestrians

if added on exclusions road sections unauthorised for pedestrian use are not used. The configName parameter with a value of pedestrian uses this exclusion.

Automobiles

if added on exclusions road sections with restricted automobile access are not used. The configName parameter with a value of car uses this exclusion.

Trucks

if added on exclusions road sections with restricted access for lorries are not used. The configName with a value of truck or delivery truck vehicle or emergency truck uses this exclusion.

Bus

if added on exclusions road sections with restricted access for buses are not used. The configName with a value of bus uses this exclusion.

Deliveries

if added on exclusions road sections with restricted access for deliveries are not used. The configName with a value of delivery light vehicle or delivery truck vehicle uses this exclusion.

Taxis

if added on exclusions road sections with restricted access for taxis are not used. The configName with a value of taxi uses this exclusion.

Emergencies

if added on exclusions road sections with restricted access for emergencies are not used. The configName with a value of emergency truck or emergency vehicle uses this exclusion.

Carpools

if added on exclusions road sections with restricted access for carpools are not used.

Throughtraffic

if added on exclusions road sections with restricted access for non-local traffic are not used.

ZFE

if added on exclusions low carbon emmission areas in France will be excluded

(Hazardous material)

See description bellow.

4.

What are the Hazardous material exclusions?

Hazardous material defines a restriction to a road for any vehicle carrying the specific hazardous material. Hazardous material restrictions are government regulations and can be different per country.

  • Flammable: explosives, flammable, gas, combustible, …
  • Pollutant: goods harmful for water
  • Toxic: organic, poison, radioactive, corrosive, …
  • Dangerous: tunnel categories and others restrictions