Calculate duration for route through ferry

This is a request for a calculation of the travel duration without traffic information for a route that goes through ferry.

curl -X GET \
'https://router.hereapi.com/v8/routes?origin=51.13747,1.33148&destination=50.96035,1.905025&return=summary&transportMode=car&apikey={YOUR_API_KEY}'
{
    "routes": [
        {
            "id": "fe1d3ac8-411e-4b47-bd2a-8056484865ce",
            "sections": [
                {
                    "id": "3f104c2d-7ec2-4a63-9e3b-dcf6b9acd251",
                    "type": "vehicle",
                    "departure": {
                        "time": "2021-08-05T10:15:24+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 51.1374629,
                                "lng": 1.331544
                            },
                            "originalLocation": {
                                "lat": 51.13747,
                                "lng": 1.33148
                            }
                        }
                    },
                    "arrival": {
                        "time": "2021-08-05T10:24:25+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 51.1259,
                                "lng": 1.33574
                            }
                        }
                    },
                    "summary": {
                        "duration": 541,
                        "length": 3898,
                        "baseDuration": 501
                    },
                    "transport": {
                        "mode": "car"
                    }
                },
                {
                    "id": "2239e39b-4eef-4ce0-9988-1c434a1e13a9",
                    "type": "transit",
                    "preActions": [
                        {
                            "action": "board",
                            "duration": 1200
                        }
                    ],
                    "postActions": [
                        {
                            "action": "deboard",
                            "duration": 600
                        }
                    ],
                    "departure": {
                        "time": "2021-08-05T10:24:25+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 51.1259,
                                "lng": 1.33574
                            }
                        }
                    },
                    "arrival": {
                        "time": "2021-08-05T12:25:14+02:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 50.96752,
                                "lng": 1.84917
                            }
                        }
                    },
                    "summary": {
                        "duration": 5449,
                        "length": 40565
                    },
                    "notices": [
                        {
                            "title": "No schedule information available.",
                            "code": "noSchedule",
                            "severity": "info"
                        }
                    ],
                    "transport": {
                        "mode": "ferry",
                        "name": "Dover-Calais"
                    }
                },
                {
                    "id": "554714bc-a8c1-406f-8895-d2f81f88722e",
                    "type": "vehicle",
                    "departure": {
                        "time": "2021-08-05T12:25:14+02:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 50.96752,
                                "lng": 1.84917
                            }
                        }
                    },
                    "arrival": {
                        "time": "2021-08-05T12:32:34+02:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 50.9603594,
                                "lng": 1.905304
                            },
                            "originalLocation": {
                                "lat": 50.96035,
                                "lng": 1.905025
                            }
                        }
                    },
                    "summary": {
                        "duration": 440,
                        "length": 5273,
                        "baseDuration": 396
                    },
                    "transport": {
                        "mode": "car"
                    }
                }
            ]
        }
    ]
}

Calculation

The details of the calculation for this request are the following: Duration without traffic = first section baseDuration + second (ferry) section duration + third section baseDuration = 501 + 5449 + 396 = 6346 sec = 1h 45m 46s

For more information on ferries, see Use ferries.

results matching ""

    No results matching ""