Calculate a Park and Ride Route

User Story

You request an intermodal route from Nauener Tor in Potsdam to Invalidenstraße in Berlin with the Intermodal Routing API v8 using a combination of vehicle and transit transport types. We call this Park and Ride intermodal route. You want to drive until the outskirts of Berlin, park the car and reach your destination through public transportation.

Request

An intermodal route calculation consists of a single GET request. The only required parameters are an origin and a destination, given by two pairs of WGS84 coordinates in the form <latitude>,<longitude>.

However, it is important to set the optional parameters vehicle[modes]=car, vehicle[enable]=routeHead, transit[enable]=routeTail, and rented[enable]= to ensure the Park and Ride intermodal route in the response.

The vehicle[modes]=car and vehicle[enable]=routeHead parameters force the intermodal router to return (private) vehicle transport type in the head section of the route. Whereas the transit[enable]=routeTail parameter forces the intermodal algorithm to return public transit route options in the tail section of the route. The rented[enable]= parameter is needed to disable the rented transport type in the response which is enabled by default for all sections of the route.

Note

Park and Ride sends a car routing request to the Routing API to identify suitable areas along the route where to search for parking lots.

For more information on the flavors and transport types of the Intermodal Routing API v8, see the Intermodal Flavors & Transport Types section.

GET https://intermodal.router.hereapi.com/v8/routes
    ?destination=52.53105637575095,13.384944833815183
    &origin=52.40358749909618,13.058351363288239
    &vehicle[enable]=routeHead
    &vehicle[modes]=car
    &transit[enable]=routeTail
    &rented[enable]=
Authorization: Bearer 

Note

For more information on the currently available authentication methods, see Authentication and Authorization Developer Guide.

By default, the Intermodal Routing API v8 returns only one optimal intermodal route. The optional parameter alternatives represents the number of alternative routes to return aside from the optimal route. By default, it is set to alternatives=0.

Note

By default, the vehicle[enable]= parameter is disabled because we assume that not everyone owns a private vehicle, like a car.

Response

If the intermodal route calculation was successful, the /routes response contains the requested details about the calculated route:

  • one optimal intermodal route
  • one or a combination of the following transport types each of which contains departure/arrival times, duration, coordinates, and other section information, depending on their availability in the area:
    • vehicle - route section in which you drive from your origin to the location of transfer
    • pedestrian - route section in which you park the car and transfer from vehicle to transit
    • transit - route section with the actual stops or stations of departure and arrival. Optionally, all intermediate stops in between can be enabled with the return=intermediate parameter
  • a set of operators that run the services included in the alternatives, including operator code, operator name and links to operator websites, if any.
{
  "routes": [
    {
      "id": "R005495-C0",
      "sections": [
        {
          "id": "R005495-C0-S0",
          "type": "vehicle",
          "postActions": [
            {
              "action": "park",
              "duration": 300
            }
          ],
          "departure": {
            "time": "2020-04-29T11:51:55+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.4035943,
                "lng": 13.0583453
              }
            }
          },
          "arrival": {
            "time": "2020-04-29T12:07:24+02:00",
            "place": {
              "name": "P+R Wannsee S-Bahn",
              "waypoint": 0,
              "type": "parkingLot",
              "location": {
                "lat": 52.41976,
                "lng": 13.18058
              },
              "id": "276u3365-1679b528d63c4c7e9719561ae6c9e787",
              "attributes": [
                "parkAndRide"
              ]
            }
          },
          "transport": {
            "mode": "car"
          }
        },
        {
          "id": "R005495-C0-S1",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-29T12:12:24+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.41976,
                "lng": 13.18058
              }
            }
          },
          "arrival": {
            "time": "2020-04-29T12:18:24+02:00",
            "place": {
              "name": "S Wannsee Bhf",
              "type": "station",
              "location": {
                "lat": 52.421457,
                "lng": 13.179099
              },
              "id": "216041100"
            }
          }
        },
        {
          "id": "R005495-C0-S2",
          "type": "transit",
          "departure": {
            "time": "2020-04-29T12:27:00+02:00",
            "place": {
              "name": "S Wannsee Bhf",
              "type": "station",
              "location": {
                "lat": 52.421457,
                "lng": 13.179099
              },
              "id": "216041100"
            }
          },
          "arrival": {
            "time": "2020-04-29T12:44:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.525847,
                "lng": 13.368924
              },
              "id": "216022539"
            }
          },
          "transport": {
            "mode": "regionalTrain",
            "name": "RE7",
            "category": "Regional Train",
            "color": "#269900",
            "textColor": "#FFFFFF",
            "headsign": "Wünsdorf-Waldstadt, Bahnhof"
          },
          "agency": {
            "id": "cKO10800",
            "name": "DB Regio AG",
            "website": "http://www.bahn.de/brandenburg"
          }
        },
        {
          "id": "R005495-C0-S3",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-29T12:44:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.525847,
                "lng": 13.368924
              },
              "id": "216022539"
            }
          },
          "arrival": {
            "time": "2020-04-29T12:45:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.525847,
                "lng": 13.368924
              },
              "id": "216000126"
            }
          }
        },
        {
          "id": "R005495-C0-S4",
          "type": "transit",
          "departure": {
            "time": "2020-04-29T12:47:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.525847,
                "lng": 13.368924
              },
              "id": "216000126"
            }
          },
          "arrival": {
            "time": "2020-04-29T12:51:00+02:00",
            "place": {
              "name": "U Naturkundemuseum",
              "type": "station",
              "location": {
                "lat": 52.530339,
                "lng": 13.382224
              },
              "id": "216005176"
            }
          },
          "transport": {
            "mode": "lightRail",
            "name": "M10",
            "category": "Tram",
            "color": "#FF3300",
            "textColor": "#FFFFFF",
            "headsign": "S+U Warschauer Str."
          },
          "agency": {
            "id": "cKO79600",
            "name": "Berliner Verkehrsbetriebe",
            "website": "http://www.bvg.de"
          }
        },
        {
          "id": "R005495-C0-S5",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-29T12:51:00+02:00",
            "place": {
              "name": "U Naturkundemuseum",
              "type": "station",
              "location": {
                "lat": 52.530339,
                "lng": 13.382224
              },
              "id": "216005176"
            }
          },
          "arrival": {
            "time": "2020-04-29T12:54:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.531056,
                "lng": 13.384945
              }
            }
          }
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""