How to calculate indoor route
GET /routes endpoint
GET /routes endpointMandatory request parameters
origin: Contains coordinates of the origin point along with indoor map id and corresponding level iddestination: Contains coordinates of the destination point along with indoor map id and corresponding level id. It can also have a waypoint option as stop duration in seconds.transportMode: Mode of transport. Supported transport modes are as below:pedestriancartaxiscooter
Optional request parameters
pedestrian[speed]: Customized speed of pedestrian ranging from 0.5 to 2 m/svehicle[speed]: Customized speed of vehicle ranging from 2 m/s to 5 m/svehicle[enable]: Provides options to user to start, end or have entire journey with the given vehicle mode. Allowed values are mentioned below:routeHeadrouteTailentireRoute
routingMode: Mode of routing to determine fastest or shortest route required. Allowed values are mentioned below:fastshort
avoid[features]: If user wants to avoid any features along the route. Allowed values are mentioned below:elevatorescalatormovingWalkwayrampstairspedestrianRampcarLiftdriveRampelevatorBank
via: Intermediade waypoints array between origin and destination which contains coordinates of the point along with indoor map id, corresponding level id and other waypoint options like pass through flag and stop duration in seconds. It allows upto 5 via waypoints as an input from the user.
Pedestrian route example
Sample request URL for pedestrian mode
https://indoor.router.hereapi.com/v1/routes?\
transportMode=pedestrian&\
pedestrian[speed]=1&\
origin=52.5306348,13.3848528;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61784&\
destination=52.5308726,13.3845703;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61782&\
avoid[features]=stairs&routingMode=fastSample rendering of the pedestrian route through stairs

Sample output for pedestrian only route
{
"routes": [
{
"sections": [
{
"type": "pedestrian",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5307934,
"lng": 13.3854177,
"lvl": 2,
"levelId": "level-61422"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5309169,
"lng": 13.385328,
"lvl": 3,
"levelId": "level-61423"
}
}
},
"polyline": "BX8ho-pfi-5p_HElElfAyHtFA8kB5aAsEjDA4SzNAuIhGAmLjIAuEnDApNxxBApM-IAyEiRAACAAAEhF5SBmM7IA6NqzBA1EsDAhLgIA0FieA",
"actions": [
{
"offset": 0,
"action": "depart",
"length": 0,
"duration": 0
},
{
"offset": 0,
"action": "leave",
"length": 3.46,
"duration": 3.5,
"space": {
"category": "FACILITY",
"type": "ROOM",
"name": "Copy/Print"
}
},
{
"offset": 0,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "HALLWAY"
}
},
{
"offset": 1,
"action": "turn",
"length": 17.82,
"duration": 17.8,
"direction": "right",
"severity": "quite"
},
{
"offset": 8,
"action": "turn",
"length": 5.87,
"duration": 5.9,
"direction": "left",
"severity": "quite"
},
{
"offset": 9,
"action": "turn",
"length": 2.4,
"duration": 2.4,
"direction": "left",
"severity": "quite"
},
{
"offset": 9,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "LEVEL_CONNECTOR",
"type": "STAIRS"
}
},
{
"offset": 10,
"action": "turn",
"length": 2.02,
"duration": 2,
"direction": "left",
"severity": "quite"
},
{
"offset": 11,
"action": "changeLevel",
"length": 2.23,
"duration": 27.3,
"levelConnector": "stairs",
"levelDelta": 1
},
{
"offset": 13,
"action": "turn",
"length": 2.38,
"duration": 2.4,
"direction": "right",
"severity": "quite"
},
{
"offset": 13,
"action": "leave",
"length": 0,
"duration": 0,
"space": {
"category": "LEVEL_CONNECTOR",
"type": "STAIRS"
}
},
{
"offset": 13,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "HALLWAY"
}
},
{
"offset": 14,
"action": "turn",
"length": 6.07,
"duration": 6.1,
"direction": "right",
"severity": "quite"
},
{
"offset": 15,
"action": "turn",
"length": 3.06,
"duration": 3.1,
"direction": "right",
"severity": "quite"
},
{
"offset": 17,
"action": "turn",
"length": 3.41,
"duration": 3.4,
"direction": "left",
"severity": "quite"
},
{
"offset": 17,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "FACILITY",
"type": "KITCHEN"
}
},
{
"action": "arrive",
"offset": 19,
"length": 0,
"duration": 0
}
],
"summary": {
"length": 49,
"duration": 74
},
"transport": {
"mode": "pedestrian"
}
}
]
}
]
}Multimodal route example
Sample request URL for vehicle mode
https://indoor.router.hereapi.com/v1/routes?\
origin=52.53074557107664,13.384900033438564;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61421&\
destination=52.53063213306504,13.38561517303418;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61784&\
transportMode=carSample rendering of the multimodal route with different color codes

Sample output for multimodal route
{
"routes": [
{
"sections": [
{
"type": "pedestrian",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5307458,
"lng": 13.3849022,
"lvl": 1,
"levelId": "level-61421"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.53065978,
"lng": 13.38502044,
"lvl": -1,
"levelId": "level-61784"
}
}
},
"polyline": "BXkkn-pf87vp_HCwM0eA_NmKAhF0DA9V-PA1C-BAnOqKAjHkFAyNyyBAiL_HAzEjRAvBlFBgBPA8DwOB_L2IAxM5uBA",
"actions": [
{
"offset": 0,
"action": "depart",
"length": 0,
"duration": 0
},
{
"offset": 0,
"action": "leave",
"length": 3.99,
"duration": 4,
"space": {
"category": "FACILITY",
"type": "MEETING_ROOM"
}
},
{
"offset": 0,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "HALLWAY"
}
},
{
"offset": 1,
"action": "turn",
"length": 12.65,
"duration": 12.6,
"direction": "right",
"severity": "heavy"
},
{
"offset": 7,
"action": "turn",
"length": 5.98,
"duration": 6,
"direction": "left",
"severity": "quite"
},
{
"offset": 8,
"action": "turn",
"length": 2.15,
"duration": 2.1,
"direction": "left",
"severity": "quite"
},
{
"offset": 8,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "LEVEL_CONNECTOR",
"type": "STAIRS"
}
},
{
"offset": 9,
"action": "turn",
"length": 2.03,
"duration": 2,
"direction": "left",
"severity": "quite"
},
{
"offset": 10,
"action": "changeLevel",
"length": 0.63,
"duration": 13.1,
"levelConnector": "stairs",
"levelDelta": -1
},
{
"offset": 11,
"action": "turn",
"length": 0.19,
"duration": 12.7,
"direction": "right",
"severity": "quite"
},
{
"offset": 11,
"action": "changeLevel",
"length": 0,
"duration": 0,
"levelConnector": "stairs",
"levelDelta": -1
},
{
"offset": 12,
"action": "turn",
"length": 1.72,
"duration": 1.7,
"direction": "right",
"severity": "quite"
},
{
"offset": 13,
"action": "turn",
"length": 2.34,
"duration": 2.3,
"direction": "right",
"severity": "quite"
},
{
"offset": 14,
"action": "turn",
"length": 5.54,
"duration": 5.5,
"direction": "right",
"severity": "quite"
},
{
"offset": 14,
"action": "leave",
"length": 0,
"duration": 0,
"space": {
"category": "LEVEL_CONNECTOR",
"type": "STAIRS"
}
},
{
"offset": 14,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "DRIVABLE_HALLWAY"
}
},
{
"action": "arrive",
"offset": 15,
"length": 0,
"duration": 0
}
],
"summary": {
"length": 37,
"duration": 62
},
"transport": {
"mode": "pedestrian"
}
},
{
"type": "vehicle",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.53065978,
"lng": 13.38502044,
"lvl": -1,
"levelId": "level-61784"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.53064886,
"lng": 13.38560528,
"lvl": -1,
"levelId": "level-61784"
}
}
},
"polyline": "BXsul-pf4lyp_HBrEmDAxHwFAhI6FA9NkKArN2JApQ6LAmCoIA4FsVA0F6UA-FqWAuFiUAsD4MAiC2HA2FmVA6FyVAwF0UA0FgVAyF0UAuFuUAqB4EAyEgRAyF6UAwF0UA1JiHAtOwKA",
"actions": [
{
"offset": 15,
"action": "turn",
"length": 12.37,
"duration": 34.4,
"direction": "left",
"severity": "quite"
},
{
"offset": 21,
"action": "turn",
"length": 35.71,
"duration": 12.8,
"direction": "left",
"severity": "quite"
},
{
"offset": 38,
"action": "turn",
"length": 4.7,
"duration": 1.7,
"direction": "right",
"severity": "quite"
},
{
"offset": 38,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "TRAFFIC",
"type": "PARKING_SPOT"
}
},
{
"action": "arrive",
"offset": 25,
"length": 0,
"duration": 0
}
],
"summary": {
"length": 53,
"duration": 49
},
"transport": {
"mode": "car"
}
}
]
}
]
}Add via waypoints to a route
Sample request URL
https://indoor.router.hereapi.com/v1/routes?\
origin=52.53051316788,13.38482607083;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61422&\
destination=52.5306807972,13.38532180772;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61422&\
transportMode=pedestrian&\
via=52.5305595965,13.3849959047;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61422!passThrough=false!stopDuration=40&\
via=52.5305840995,13.38508091866;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61422!stopDuration=60&\
via=52.530633782,13.38518170901;indoorMapId=indoormap-00000000-0000-4000-a000-000000025556;levelId=level-61422!passThrough=true
Sample output with intermediate waypoints in the route
{
"routes": [
{
"sections": [
{
"type": "pedestrian",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5305136,
"lng": 13.3848277,
"lvl": 2,
"levelId": "level-61422"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5305609,
"lng": 13.3849954,
"lvl": 2,
"levelId": "level-61422"
}
}
},
"polyline": "BXgzi-pfqtup_HE1DpLAkI7FAsJ5GA-JklBAwKzHA6ImgBAyB0FA9GiFAhF2DApDsCAuD2MA-EqSAlCyBAhI6FAkCgMA",
"actions": [
{
"offset": 0,
"action": "depart",
"length": 0,
"duration": 0
},
{
"offset": 0,
"action": "leave",
"length": 1.39,
"duration": 1.4,
"space": {
"category": "FIXTURE",
"type": "CUBICLE"
}
},
{
"offset": 1,
"action": "turn",
"length": 3.4,
"duration": 3.4,
"direction": "right",
"severity": "quite"
},
{
"offset": 3,
"action": "turn",
"length": 4.39,
"duration": 4.4,
"direction": "right",
"severity": "quite"
},
{
"offset": 4,
"action": "turn",
"length": 2.04,
"duration": 2,
"direction": "left",
"severity": "quite"
},
{
"offset": 4,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "HALLWAY"
}
},
{
"offset": 5,
"action": "turn",
"length": 4.49,
"duration": 4.5,
"direction": "right",
"severity": "quite"
},
{
"offset": 7,
"action": "turn",
"length": 2.98,
"duration": 3,
"direction": "right",
"severity": "quite"
},
{
"offset": 10,
"action": "turn",
"length": 3.67,
"duration": 3.7,
"direction": "left",
"severity": "quite"
},
{
"offset": 12,
"action": "turn",
"length": 1.99,
"duration": 2,
"direction": "right",
"severity": "quite"
},
{
"offset": 14,
"action": "turn",
"length": 1.35,
"duration": 1.4,
"direction": "left",
"severity": "quite"
},
{
"offset": 14,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "FIXTURE",
"type": "CUBICLE"
}
},
{
"action": "arrive",
"offset": 15,
"length": 0,
"duration": 0
}
],
"postActions": [
{
"action": "wait",
"duration": 40
}
],
"summary": {
"length": 26,
"duration": 66
},
"transport": {
"mode": "pedestrian"
}
},
{
"type": "pedestrian",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5305609,
"lng": 13.3849954,
"lvl": 2,
"levelId": "level-61422"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5305854,
"lng": 13.3850824,
"lvl": 2,
"levelId": "level-61422"
}
}
},
"polyline": "BXywj-pfk2xp_HEjC_LAiI5FAmCxBAgFzDAoDpCAmHnFA-JikBAtHuFAsK2mBAtKyHA_H6FA1CzIA",
"actions": [
{
"offset": 0,
"action": "depart",
"length": 0,
"duration": 0
},
{
"offset": 0,
"action": "leave",
"length": 1.35,
"duration": 1.4,
"space": {
"category": "FIXTURE",
"type": "CUBICLE"
}
},
{
"offset": 1,
"action": "turn",
"length": 4.99,
"duration": 5,
"direction": "right",
"severity": "quite"
},
{
"offset": 1,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "HALLWAY"
}
},
{
"offset": 6,
"action": "turn",
"length": 4.29,
"duration": 4.3,
"direction": "right",
"severity": "quite"
},
{
"offset": 7,
"action": "turn",
"length": 1.45,
"duration": 1.5,
"direction": "right",
"severity": "quite"
},
{
"offset": 8,
"action": "turn",
"length": 4.58,
"duration": 4.6,
"direction": "left",
"severity": "quite"
},
{
"offset": 9,
"action": "turn",
"length": 3.59,
"duration": 3.6,
"direction": "right",
"severity": "quite"
},
{
"offset": 11,
"action": "turn",
"length": 1.05,
"duration": 1,
"direction": "right",
"severity": "quite"
},
{
"offset": 11,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "FIXTURE",
"type": "CUBICLE"
}
},
{
"action": "arrive",
"offset": 12,
"length": 0,
"duration": 0
}
],
"postActions": [
{
"action": "wait",
"duration": 60
}
],
"summary": {
"length": 21,
"duration": 81
},
"transport": {
"mode": "pedestrian"
}
},
{
"type": "pedestrian",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5305854,
"lng": 13.3850824,
"lvl": 2,
"levelId": "level-61422"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5306742,
"lng": 13.3853206,
"lvl": 2,
"levelId": "level-61422"
}
}
},
"passthrough": [
{
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.5306337823789,
"lng": 13.385181709012262,
"lvl": 2,
"levelId": "level-61422"
}
},
"offset": 7
}
],
"polyline": "BX8_j-pfwszp_HE2C0IAgI5FAuKxHAmH2aA6HzFA8FuVA3LoWA4LnWAsC3BAiBkEA8J2kBA6JqkBA8CyKAvMmZA",
"actions": [
{
"offset": 0,
"action": "depart",
"length": 0,
"duration": 0
},
{
"offset": 0,
"action": "leave",
"length": 1.05,
"duration": 1,
"space": {
"category": "FIXTURE",
"type": "CUBICLE"
}
},
{
"offset": 1,
"action": "turn",
"length": 3.59,
"duration": 3.6,
"direction": "left",
"severity": "quite"
},
{
"offset": 3,
"action": "turn",
"length": 3.16,
"duration": 3.2,
"direction": "right",
"severity": "quite"
},
{
"offset": 4,
"action": "turn",
"length": 1.52,
"duration": 1.5,
"direction": "left",
"severity": "quite"
},
{
"offset": 4,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "HALLWAY"
}
},
{
"offset": 5,
"action": "turn",
"length": 2.55,
"duration": 2.5,
"direction": "right",
"severity": "quite"
},
{
"offset": 6,
"action": "turn",
"length": 3.18,
"duration": 3.2,
"direction": "right",
"severity": "quite"
},
{
"offset": 6,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "FACILITY",
"type": "MEETING_ROOM"
}
},
{
"offset": 7,
"action": "uTurn",
"length": 3.18,
"duration": 3.2
},
{
"offset": 7,
"action": "leave",
"length": 0,
"duration": 0,
"space": {
"category": "FACILITY",
"type": "MEETING_ROOM"
}
},
{
"offset": 7,
"action": "enter",
"length": 0,
"duration": 0,
"space": {
"category": "STRUCTURE",
"type": "HALLWAY"
}
},
{
"offset": 8,
"action": "turn",
"length": 0.47,
"duration": 0.5,
"direction": "right",
"severity": "light"
},
{
"offset": 9,
"action": "turn",
"length": 10.38,
"duration": 10.4,
"direction": "right",
"severity": "quite"
},
{
"offset": 13,
"action": "turn",
"length": 3.51,
"duration": 3.5,
"direction": "right",
"severity": "quite"
},
{
"action": "arrive",
"offset": 14,
"length": 0,
"duration": 0
}
],
"summary": {
"length": 33,
"duration": 33
},
"transport": {
"mode": "pedestrian"
}
}
]
}
]
}Fields in the output
type: Defines the type of route whether its pedestrian or vehicledeparture: Nearest routing node from the origin point given in the requestarrival: Nearest routing node from the destination point given in the requestpassthrough: Passthrough waypoints which shape the route, but are neither the origin nor the destinationpolyline: Actual representation of the route with the help of multiple linestrings. This is encoded polyline mainly used for rendering purposeactions: It includes step-by-step actions such as depart, arrive, turn, make a U-turn, and change level. It can also include actions like enter and leave for specific spaces. Each space will have information such as category, type, and name (if available)postActions: It includes the action specifically to wait for certain time in seconds mentioned in stopDurationsummary: Overall summary of the route in terms of length and duration including post actionstransport: Transport mode requested by the user
Note
All the lengths are in
meters(m)and durations are inseconds(s). A transition penalty of30 secondswill be added for every change of modes in the route.
Notices
The route response may include various notices that indicate errors, warnings, or information about the route calculation.
In this section, we highlight some of the key features of notices. For full details on notices, see the specification at Indoor routing API reference
Appearance
The notices may appear at different levels of the response.
Top-level notices
These notices appear at the top level of the response, and generally indicate a high level failure. For example, a noRouteFound notice indicates that route calculation failed because no route was found or any condition given by the user is not satsfied like route should start with the vehicle.
Route section notices
These notices appear at the section level within a route and generally indicate some issue with the route produced. The majority of these route section notices indicate some restriction that the route calculation did not avoid (for example, violatedAvoidStairs)
Attributes
Code
The notice code is an enumerated string that indicates the type of notice. Examples include:
noRouteFoundcouldNotMatchOrigincouldNotMatchDestinationviolatedRouteHeadConditionignoredVehicleEnablenoRouteFoundWithViacouldNotMatchViaWaypoint
Title
This field is a human-readable string equivalent to code. Examples include:
noRouteFound- "No route available between given origin and destination"violatedRouteHeadCondition- "Cannot provide route with the given vehicle routeHead condition."
Severity
severity is an enumerated string that indicates the severity of an issue. Example:
criticalinfo
Sample output with critical notice
{
"routes": [],
"notices": [
{
"code": "noRouteFound",
"title": "No route available between given origin and destination",
"severity": "critical"
}
]
}Sample output with info notice
{
"routes": [
{
"sections": [
{
"type": "vehicle",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.53062766,
"lng": 13.38483246,
"lvl": -1,
"levelId": "level-61784"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.53064071,
"lng": 13.3847907,
"lvl": -1,
"levelId": "level-61784"
}
}
},
"polyline": "BXq6k-pfqwup_HBvE_QA0MjJA",
"actions": [
...
],
"summary": {
"length": 4,
"duration": 2
},
"transport": {
"mode": "car"
}
},
{
"type": "pedestrian",
"departure": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.53064071,
"lng": 13.3847907,
"lvl": -1,
"levelId": "level-61784"
}
}
},
"arrival": {
"place": {
"type": "indoor",
"id": "indoormap-00000000-0000-4000-a000-000000025556",
"location": {
"lat": 52.530651137083325,
"lng": 13.38482515584221,
"lvl": -1,
"levelId": "level-61784"
}
}
},
"polyline": "BXuil-pfm2tp_HBiG8VAOJA",
"actions": [
...
],
"summary": {
"length": 3,
"duration": 33
},
"transport": {
"mode": "pedestrian"
}
}
]
}
],
"notices": [
{
"code": "violatedEntireRouteCondition",
"title": "Cannot provide route with the given vehicle entrieRoute condition.",
"severity": "info"
}
]
}Updated last month