Hey all together,
maybe someone could give me a good hint how to use a specific ROLA within a route calculation?
E.g. Wörgl-Brennero?
How to add a ROLA to the routing?
-
- Posts: 5
- Joined: Mon Jun 13, 2022 9:56 am
How to add a ROLA to the routing?
Uta Jäger-Frenk
Support Specialist at PTV Logistics - Germany
Happy to help the products PTV Developer, PTV xServer, PTV Navigator G1 and G2
Support Specialist at PTV Logistics - Germany
Happy to help the products PTV Developer, PTV xServer, PTV Navigator G1 and G2
-
- Posts: 16
- Joined: Fri Dec 29, 2017 9:00 am
Re: How to add a ROLA to the routing?
The Data API offers the possibility to search for available combined transports, try this sample:
https://developer.myptv.com/en/document ... transports
Here's an excerpt when searching for "Rola":
If you find the connection you desire you can use them as a combined transport waypoint in the Routing API where you specify the start and destination coordinates of the combined transport.
The response even contains the string how it needs to be specified as query parameter in the Routing API:
https://developer.myptv.com/en/document ... transports
Here's an excerpt when searching for "Rola":
Code: Select all
{
"polyline": "{\"type\":\"LineString\",\"coordinates\":[[...]]}",
"name": "Rola Wörgl-Brenner", "duration": 18082, "type": "RAIL",
"start": {
"latitude": 47.482539082, "longitude": 12.033915862, "name": "Wörgl", "countryCode": "AT"
},
"destination": {
"latitude": 46.103613833, "longitude": 11.096358212, "name": "Trento", "countryCode": "IT"
},
"allowedFor": "VAN,TRUCK",
"waypointsParameter": "combinedTransport=47.482539082,12.033915862,46.103613833,11.096358212"
}
The response even contains the string how it needs to be specified as query parameter in the Routing API:
Code: Select all
combinedTransport=47.482539082,12.033915862,46.103613833,11.096358212
Maximilian Vogel
Developer
PTV Logistics
Developer
PTV Logistics
- Bernd Welter
- Site Admin
- Posts: 2695
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: How to add a ROLA to the routing?
Hello Uta,
the ROLA (=Rollende Landstraße) is s so-called combined transport, in this case a piggyback:
the ROLA (=Rollende Landstraße) is s so-called combined transport, in this case a piggyback:
- Therefore you may have to ensure that piggybacks are allowed (or even preferred) in the routing.
- A side effect of Combined Transports is their contribution to the travel distance: "0 meters" because you are not driving. To push towards Combined Transports you may therefore consider to use the routing to go for "shortest" instead of "fastest".
- If the comined transport you expect isn't chosen by the API automatically you may have to add a dedicated Waypoint type to your station list.
API | PTV xServer2 / xRoute2 | PTV Developer Routing API |
---|---|---|
Consider piggyback | com.ptvgroup.xserver.routingprofile.CombinedTransport.railPenalty | RoutingAPI.Options.avoid (you can block but not prefer them) |
Waypoint properties | com.ptvgroup.xserver.xroute.CombinedTransportViaWaypoint | Concept "CombinedTransports" |
Where to get relevant properties? | com.ptvgroup.xserver.xdata.SegmentsRequest | DataAPI.getCombinedTransports() |
Sample "Waypoints" | Code: Select all
| Code: Select all
|
Attention | Segment IDs change from map version to map version. |
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...
Technical Partner Manager Developer Components
PTV Logistics - Germany
Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning...