Pedestrian Routing Request

The pedestrian routing API computes personalized pedestrian routes from a start location to a number of destination locations using Per Pedes Routing (PPR).

  • start required, type Position

    The start location.

  • destinations required, array of Position

    At least one destination location.

  • search_options required

    The PPR search profile and maximum walk duration to use. See PPR Search Profile.

  • include_steps optional, type boolean, default is false

    Whether to include a travel itinerary in the response.

  • include_edges optional, type boolean, default is false

    Whether to include a list of all used edges in the response (useful for debugging purposes).

  • include_path optional, type boolean, default is false

    Whether to include the complete path as a single polyline in the response.

Pedestrian Routing Response

The pedestrian routing response contains routes from the start location to each of the destination locations included in the request.

  • routes array of Routes

    Contains a list of routes for each destination included in the request. This list always has the same size as the destinations list from the request, and contains routes for the destinations in the same order as they appear in the request.

Routes

  • routes array of Route

    All pareto-optimal routes from the start location to this destination location. This list can be empty if no route could be found within the specified duration limit.

Route

  • distance type float

    The total walking distance in meters.

  • duration type integer

    The total duration in minutes (rounded as specified in the search profile).

  • duration_exact type float

    The total duration in minutes.

  • duration_division type float

    Duration division, if used in the search profile and more routes than allowed were found.

  • accessibility type integer

    The total accessibility value of the connection (rounded as specified in the search profile).

  • accessibility_exact type float

    The total accessibility value of the connection.

  • accessibility_division type float

    Accessibility division, if used in the search profile and more routes than allowed were found.

  • start type Position

    The start location of this route.

  • destination type Position

    The destination location of this route.

  • elevation_up type float

    Total upwards elevation profile in meters.

  • elevation_down type float

    Total downwards elevation profile in meters.

  • steps array of RouteStep

    A list of steps describing the itinerary. Only present if include_steps was set to true in the request (otherwise an empty array).

  • edges array of Edge

    A list of edges used in the route. Only present if include_edges was set to true in the request (otherwise an empty array).

  • path type Polyline

    A polyline describing the complete route. Only present if include_path was set to true in the request (otherwise an empty polyline).

RouteStep

  • step_type type string

    Type of this step.

    • STREET: Walk along a street.
    • FOOTWAY: Walk along a footpath.
    • CROSSING: Cross a street or railway/tram tracks.
    • ELEVATOR: Use an elevator.
    • ENTRANCE: Use an entrance.
    • CYCLE_BARRIER: Pass a cycle barrier.
  • street_name type string

    The name of the street, if applicable (otherwise an empty string).

  • street_type type string

    The type of street, footway or railway. See OpenStreetMap for descriptions of the various types.

    • NONE (default)
    • TRACK
    • FOOTWAY
    • PATH
    • CYCLEWAY
    • BRIDLEWAY
    • STAIRS
    • ESCALATOR
    • MOVING_WALKWAY
    • PLATFORM
    • SERVICE
    • PEDESTRIAN
    • LIVING
    • RESIDENTIAL
    • UNCLASSIFIED
    • TERTIARY
    • SECONDARY
    • PRIMARY
    • RAIL
    • TRAM
  • crossing_type type string

    If step_type is CROSSING, this attribute specifies the type of crossing. See OpenStreetMap for descriptions of the various crossing types.

    • NONE (default)
    • GENERATED: Automatically generated unmarked crossing (not included in OpenStreetMap data).
    • UNMARKED: Unmarked crossing included in OpenStreetMap data.
    • MARKED: Marked crossing, i.e. with road markings.
    • ISLAND: Crossing with a traffic island.
    • SIGNALS: Crossing with traffic signals.
  • distance type float

    Length of this segment in meters.

  • duration type float

    Duration of this segment in seconds.

  • accessibility type float

    Accessibility value of this segment.

  • path type Polyline

    A polyline describing this segment.

  • elevation_up type int

    Upwards elevation profile in meters.

  • elevation_down type int

    Downwards elevation profile in meters.

  • incline_up type boolean

    The direction of stairs (up or down).

  • handrail type string

    Whether the stairs have handrails.

    • UNKNOWN
    • NO
    • YES
  • door_type type string

    If step_type is ENTRANCE, this attribute specifies the type of door. See OpenStreetMap for descriptions of the various crossing types.

    • UNKNOWN (default)
    • YES
    • NO
    • HINGED
    • SLIDING
    • REVOLVING
    • FOLDING
    • TRAPDOOR
    • OVERHEAD
  • automatic_door_type type string

    If step_type is ENTRANCE, this attribute specifies the type of automatic door. See OpenStreetMap for descriptions of the various crossing types.

    • UNKNOWN (default)
    • YES
    • NO
    • BUTTON
    • MOTION
    • FLOOR
    • CONTINUOUS
    • SLOWDOWN_BUTTON
  • traffic_signals_sound type string

    If this is a crossing with traffic signals, specifies whether there are sound signals.

    • UNKNOWN
    • NO
    • YES
  • traffic_signals_vibration type string

    If this is a crossing with traffic signals, specifies whether there are vibration signals.

    • UNKNOWN
    • NO
    • YES

Edge

  • distance type float

    Length of this edge in meters.

  • duration type float

    Duration of this edge in seconds.

  • accessibility type float

    Accessibility value of this edge.

  • path type Polyline

    A polyline describing this edge.

  • name type string

    The name of the street, if applicable (otherwise an empty string).

  • osm_way_id type integer

    The OpenStreetMap way id of the way this edge is based on. This value is 0 for additional edges. For crossings the value is negative, the absolue value is the id of the way that is crossed.

  • edge_type type string

    The type of the routing graph edge.

    • CONNECTION
    • STREET
    • FOOTWAY
    • CROSSING
    • ELEVATOR
    • ENTRANCE
    • CYCLE_BARRIER
  • street_type type string

    The type of street, footway or railway. See RouteStep.

  • crossing_type type string

    See RouteStep.

  • elevation_up type int

    Upwards elevation profile in meters.

  • elevation_down type int

    Downwards elevation profile in meters.

  • incline_up type boolean

    The direction of stairs (up or down).

  • handrail type string

    Whether the stairs have handrails. See RouteStep.

  • door_type type string

    If edge_type is ENTRANCE, this attribute specifies the type of door. See RouteStep.

  • automatic_door_type type string

    If edge_type is ENTRANCE, this attribute specifies the type of automatic door. See RouteStep.

  • traffic_signals_sound type string

    If this is a crossing with traffic signals, specifies whether there are sound signals. See RouteStep.

  • traffic_signals_vibration type string

    If this is a crossing with traffic signals, specifies whether there are vibration signals. See RouteStep.

PPR Search Profiles

This request returns a list of available PPR search profiles.

FootRoutingProfileInfo

Contains basic information about a PPR search profile.

  • name type string

    The name of this search profile as used in routing requests (see PPR Search Profile).

  • walking_speed type float

    The walking speed of this profile in m/s.

Pedestrian Routing Request Example
{
  "destination": {
    "type": "Module",
    "target": "/ppr/route"
  },
  "content_type": "FootRoutingRequest",
  "content": {
    "start": {
      "lat": 47.390876,
      "lng": 8.487421
    },
    "destinations": [
      {
        "lat": 47.391109,
        "lng": 8.488375
      }
    ],
    "search_options": {
      "profile": "default",
      "duration_limit": 1800
    },
    "include_steps": true,
    "include_edges": false,
    "include_path": true
  }
}
Pedestrian Routing Response Example
{
  "destination": {
    "target": ""
  },
  "content_type": "FootRoutingResponse",
  "content": {
    "routes": [
      {
        "routes": [
          {
            "distance": 116.610419,
            "duration": 3,
            "duration_exact": 2.388219,
            "duration_division": 150,
            "start": {
              "lat": 47.390876,
              "lng": 8.487421
            },
            "destination": {
              "lat": 47.391109,
              "lng": 8.488375
            },
            "steps": [
              {
                "step_type": "FOOTWAY",
                "street_name": "",
                "distance": 0.475424,
                "duration": 0.339589,
                "path": {
                  "coordinates": [
                    47.390876,
                    8.487421,
                    47.390876,
                    8.487415
                  ]
                },
                "incline_up": true
              },
              {
                "step_type": "STREET",
                "street_name": "Altstetterstrasse",
                "street_type": "TERTIARY",
                "distance": 29.622971,
                "duration": 21.159265,
                "path": {
                  "coordinates": [
                    47.390876,
                    8.487415,
                    47.3909,
                    8.487417,
                    47.391142,
                    8.487447
                  ]
                }
              },
              {
                "step_type": "FOOTWAY",
                "street_name": "",
                "street_type": "FOOTWAY",
                "distance": 18.819267,
                "duration": 13.442334,
                "path": {
                  "coordinates": [
                    47.391142,
                    8.487447,
                    47.391137,
                    8.487445,
                    47.391119,
                    8.487522,
                    47.391127,
                    8.487574,
                    47.391116,
                    8.487634,
                    47.391144,
                    8.48765,
                    47.391145,
                    8.487648
                  ]
                }
              },
              {
                "step_type": "CROSSING",
                "street_name": "Hohlstrasse",
                "street_type": "TERTIARY",
                "crossing_type": "SIGNALS",
                "distance": 5.995993,
                "duration": 64.282852,
                "path": {
                  "coordinates": [
                    47.391145,
                    8.487648,
                    47.391194,
                    8.487681
                  ]
                }
              },
              {
                "step_type": "FOOTWAY",
                "street_name": "",
                "street_type": "FOOTWAY",
                "distance": 61.696763,
                "duration": 44.069116,
                "path": {
                  "coordinates": [
                    47.391194,
                    8.487681,
                    47.391194,
                    8.487679,
                    47.391232,
                    8.487701,
                    47.391227,
                    8.487794,
                    47.391199,
                    8.487887,
                    47.39114,
                    8.488099,
                    47.391072,
                    8.488353,
                    47.391109,
                    8.488375
                  ]
                },
                "incline_up": true
              }
            ],
            "edges": [],
            "path": {
              "coordinates": [
                47.390876,
                8.487421,
                47.390876,
                8.487415,
                47.3909,
                8.487417,
                47.391142,
                8.487447,
                47.391137,
                8.487445,
                47.391119,
                8.487522,
                47.391127,
                8.487574,
                47.391116,
                8.487634,
                47.391144,
                8.48765,
                47.391145,
                8.487648,
                47.391194,
                8.487681,
                47.391194,
                8.487679,
                47.391232,
                8.487701,
                47.391227,
                8.487794,
                47.391199,
                8.487887,
                47.39114,
                8.488099,
                47.391072,
                8.488353,
                47.391109,
                8.488375
              ]
            }
          }
        ]
      }
    ]
  },
  "id": 1
}
PPR Profiles Request Example
{
  "destination": {
    "type": "Module",
    "target": "/ppr/profiles"
  },
  "content_type": "MotisNoMessage",
  "content": {}
}
PPR Profiles Response Example
{
  "content_type": "FootRoutingProfilesResponse",
  "content": {
    "profiles": [
      {
        "name": "accessibility1",
        "walking_speed": 1.4
      },
      {
        "name": "default",
        "walking_speed": 1.4
      },
      {
        "name": "distance_only",
        "walking_speed": 1.4
      },
      {
        "name": "elevation",
        "walking_speed": 1.4
      },
      {
        "name": "wheelchair",
        "walking_speed": 1.4
      }
    ]
  },
  "id": 1
}