# Scooter Routing

The scooter routing mode uses a road network defined by the segments with MOTORCYCLE_OPEN flag. It gives a route that avoids all those roads which are not allowed for scooters.

Our implementation uses the term "scooter" to refer to a low-power two-wheeler vehicle, mainly used for in-city travel and transportation. This behaviour is reflected by avoiding highways and applying speed cap of 60km/hr. However, these options can be overridden with the help of below parameters:

• scooter[allowHighway] : by setting this to true scooters will be allowed on highway.
• vehicle[speedCap] : users can set speed cap for scooter which will optimize the route selection and update route ETA.

Scooter routing can be used by setting transportMode=scooter. Only the fast routing mode is supported

Note : Dedicated scooter lanes are not yet supported.

## Use case 1: Allow scooter on highways

Scooters are not allowed on highways by default. However this can be overridden by setting scooter[allowHighway]=true when requesting a route.

Example:

curl -X GET \
'https://router.hereapi.com/v8/routes?destination=53.335542,14.522257&origin=53.338226499,14.5058642048&transportMode=scooter&scooter[allowHighway]=true'

{
"routes": [
{
"sections": [
{
"id": "319a1597-333f-40b6-b127-e4ccb6835478",
"type": "vehicle",
"departure": {
"time": "2020-10-23T08:45:30+02:00",
"place": {
"type": "place",
"location": {
"lat": 53.3382266,
"lng": 14.5058641
},
"originalLocation": {
"lat": 53.3382264,
"lng": 14.5058641
}
}
},
"arrival": {
"time": "2020-10-23T08:51:30+02:00",
"place": {
"type": "place",
"location": {
"lat": 53.3354319,
"lng": 14.5222037
},
"originalLocation": {
"lat": 53.3355419,
"lng": 14.5222569
}
}
},
"transport": {
"mode": "scooter"
}
}
]
}
]
}


## Use case 2 : When scooter is not allowed on highway and route excluding highway is not possible

Sometimes no route is possible that avoids the highway, for e.g. a route that starts or ends on highway. In this case, a route is returned that makes minimal use of the highway. Furthermore, a notice (with notice code violatedAvoidControlledAccessHighway) is included to indicate that the route does not avoid the highway. Hence if the user gets this notice, then it can be concluded that route avoiding highway is not possible, and accordingly further actions can be taken.

Example:

curl -X GET \
'https://router.hereapi.com/v8/routes?destination=53.335542,14.522257&origin=53.338226499,14.5058642048&transportMode=scooter'

{
"routes": [
{
"id": "85a50dee-a7d2-4383-b3c2-14d65ce9dc6a",
"sections": [
{
"id": "dd8b21b1-5e07-4bb5-992b-a0a196ae2fc5",
"type": "vehicle",
"departure": {
"time": "2020-10-23T09:05:35+02:00",
"place": {
"type": "place",
"location": {
"lat": 53.3382266,
"lng": 14.5058641
},
"originalLocation": {
"lat": 53.3382264,
"lng": 14.5058641
}
}
},
"arrival": {
"time": "2020-10-23T09:11:35+02:00",
"place": {
"type": "place",
"location": {
"lat": 53.3354319,
"lng": 14.5222037
},
"originalLocation": {
"lat": 53.3355419,
"lng": 14.5222569
}
}
},
"notices": [
{
"title": "Violated avoid controlled-access highway.",
"code": "violatedAvoidControlledAccessHighway"
}
],
"transport": {
"mode": "scooter"
}
}
]
}
]
}


## Use Case 3 :Combination of scooter[allowHighway] and avoid[features]=controlledAccessHighway

There is a parameter avoid[features]=controlledAccessHighway which forbids highway usage. If this parameter is used then scooters are not allowed to use highways even if allowHighway is set to true. In this case (scooter[allowHighway]=true and avoid[features]=controlledAccessHighway), scooter will not be allowed on highway. Fastest route that does not go through highway will be returned. And if no route is possible that avoids the highway, then a route is returned that makes minimal use of the highway along with a notice (with notice code violatedAvoidControlledAccessHighway).

Example:

curl -X GET \
'https://router.hereapi.com/v8/routes?destination=53.335542,14.522257&origin=53.338226499,14.5058642048&transportMode=scooter&avoid[features]=controlledAccessHighway&scooter[allowHighway]=true'


## Use case 4: Provide scooter max speed

For scooters, the max speed is capped at 60 km/h or 16.66 m/s by default. The vehicle[speedCap] parameter can be used to override this speed cap. The units for this parameter are meters per second (m/s).

Example: Set scooter max scooter speed to 72 km/h.

curl -X GET \
'https://router.hereapi.com/v8/routes?destination=53.335542,14.522257&origin=53.338226499,14.5058642048&transportMode=scooter&vehicle[speedCap]=20.0'