Considering a given Combined Transport

This article discusses the use case of routingClosed with combined transportClosed. Combined transport is a form of intermodal transport, where vehiclesClosed are transported by ferries or trains. PTV xRoute offers the possibility to calculate a route that will inevitably take a desired combined transport.

Benefits

Thanks to this feature, the user can plan a route knowing that he will pass through this combined transport. This can be used, for example, by a company that has an agreement with a ferry operator.

Prerequisites

Check if the following prerequisites are fulfilled before you start with the use case.

  • Installed and licensed PTV xRoute, xData and xMap services.

Programming Guide

To force the route to go through a specific combined transport, the user can use the CombinedTransportViaWaypoint. This kind of waypointClosed can only be a via waypoint (it can not be a start or destination). It has no coordinates, the desired connection is identified using its combinedTransportId. To retrieve the combinedTransportId, we can use the PTV xData service with a getSegment operation.

There are 3 possibilities to request the segments: SegmentsByCoordinateRequest, SegmentsByIntersectingPolylineRequest and SegmentsBySurroundingPolygonRequest.

For example, a user wants to have all combined transport that start from Bristol, near Providence in the USA. He can perform a SegmentsBySurroundingPolygonRequest with segment option includedSegmentTypes to filter only COMBINED_TRANSPORT segment type.

Once the combined transports identifiers have been retrieved using the PTV xData, the user can use one of them in a CombinedTransportViaWaypoint. For example, a user located in Providence wants his itinerary to always take the ferry that goes from Bristol to Prudence Island.

Besides, to customize the combined transport handling, the user can modify the boatPenalty field in the routing profileClosed.

Related Topics