Skip to content
GuidesPlaygroundDashboard

Routing

Calculate a route between two points
routing().route(RoutingRouteParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : RouteResult
POST/api/v1/route
Snap a coordinate to the nearest road
routing().nearest(RoutingNearestParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : NearestResult
GET/api/v1/nearest
Calculate an isochrone from a point
routing().isochrone(RoutingIsochroneParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : GeoJsonFeature
GET/api/v1/isochrone
Calculate a distance matrix between points
routing().matrix(RoutingMatrixParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : MatrixResult
POST/api/v1/matrix
ModelsExpand Collapse
class MatrixRequest:
destinations: GeoJsonGeometry

Destination points (GeoJSON MultiPoint geometry)

coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")

Origin points (GeoJSON MultiPoint geometry)

coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
mode: Optional<Mode>

Travel mode

One of the following:
AUTO("auto")
FOOT("foot")
BICYCLE("bicycle")
class MatrixResult:
distances: List<List<Double>>

Distance matrix (meters), origins x destinations

durations: List<List<Double>>

Duration matrix (seconds), origins x destinations

class NearestResult:

GeoJSON Point Feature snapped to the nearest road segment

geometry: GeoJsonGeometry
coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
properties: Properties
distanceM: Optional<Double>

Distance to nearest road in meters

edgeId: Optional<Long>

Road edge ID

type: Type
class RouteRequest:
destination: GeoJsonGeometry

Destination point (GeoJSON Point geometry)

coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")

Origin point (GeoJSON Point geometry)

coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
mode: Optional<Mode>
One of the following:
AUTO("auto")
FOOT("foot")
BICYCLE("bicycle")
class RouteResult:
geometry: GeoJsonGeometry
coordinates: Coordinates

GeoJSON coordinates array (nesting depth varies by geometry type)

One of the following:
List<Double>
List<List<Double>>
List<List<List<Double>>>
List<List<List<List<Double>>>>
type: Type
One of the following:
POINT("Point")
LINE_STRING("LineString")
POLYGON("Polygon")
MULTI_POINT("MultiPoint")
MULTI_LINE_STRING("MultiLineString")
MULTI_POLYGON("MultiPolygon")
properties: Properties
distance: Optional<Double>

Total distance in meters

duration: Optional<Double>

Estimated duration in seconds

mode: Optional<String>

Travel mode used

type: Type