Skip to main content

Routing

Point to point routing

Point to point routing includes a start coordinate, a stop coordinate and returns a Google polyline encoded route geometry along with the traveldistance in meters and a traveltime in seconds.

POST /api/routing/v2/point-to-point
{
"start": [48.51901,9.05805],
"stop": [48.53242,9.03927]
}

Point ot point routing with vias

Point to point routing includes a a list of coordinates (at least 2) and returns a Google polyline encoded route geometry along with the traveldistance in meters and a traveltime in seconds.

POST /api/routing/v2/route-with-vias
{
"waypoints": [
[48.51901,9.05805],
[48.53242,9.03927]
]
}

Bulk point to point routing

POST /api/routing/v3/routing/routeBulk
{
"routeRequests": [
{
"Start": [48.5102,9.0571],
"Stop": [48.5152,9.0714]
},
{
"Start": [48.5240,9.0435],
"Stop": [48.5267,9.0608]
}
]
}

Multi point to point routing

Multi point to point routing works the same as point to point routing except that there are multiple start points and returns an array of results identical to the point to point result. The order of the routes in the result is the same as the order of the start-coordinates in the request.

POST /api/routing/v2/multipoint-to-point
{
"start": [
[48.53109,9.07647],
[48.51901,9.05805]
],
"stop": [48.53242,9.03927],
}

Isochrone

Isochrones are a spatial representation of an area that covers the edges that can be reached from a given start-coordinate within a given time. The requests contains multiple isochrone-requests each of them containing a start-coordinate and one or multiple distances.

POST /api/routing/v2/isochrones
{
"requests": [
{
"start": [48.52437,9.06005],
"distances": [100]
}
]
}

Roadblocks

Roadblocks are stored as GeoElements in a GeoStore which is defined in the configuration file:

"roadblockSources": ["http://host/api/geostore/roadblocks"]

By default all GeoElements are taken into account, this can be narrowed down by adding a predicate (not supported, yet):

"roadBlockPredicate": "emergency=no or maxweight 12 or maxheight 3.8"

Geometries

There are three geometry types of roadblocks.

Points

A point-roadblock affects the closest edge. If the closest edge is not unique it affects all closest edges.

Lines

A line-roadblock affects all edges that intersect the line.

Polygons

A polygon roadblock affects all edges that intersect the outline of the polygon and point towards the area inside of the polygon.

Timespans

Every roadblock can be configured to affect edges only within timespans. The timespans need to be put into the timespan-property of the GeoElement that represents the roadblock in the OpeningHours-format of OSM.

Weights

The default weight of a roadblock (which is the time to travel accross the edge affected by the roadblock) is one year. By adding the weight-property to the GeoElement representing the roadblock a different weight (in seconds) can be defined as an integer value.

Angle

A point-roadblock is allowed to have a angle-property defining a direction the closest edge must have to be affected. The angle is defined in degrees as an integer where a value 0 means north and 90 means east.