Routing by ferry on xServer v2
Posted: Tue Sep 29, 2020 9:58 am
Hello,
I've stumbled upon an issue that I'm not quite sure what is the best approach to resolve. We are using xServer2 and we are calculating a route that we would like to be partially done by ferry (~200km total), but the server goes the long way around the water (~600 km).
This is my request:
What I tried:
- I tried playing around with the distanceTimeWeighting parameter but we can't really go anywhere lower than 83 (because it has other business implications) and we observed that only in the low 70's it chooses the ferry route.
- I tried setting waypoints at the start and end of the ferry and it still goes the long way around
From what I found in the documentation, there's a "Combined transport" type of waypoint that would basically force the routing by ferry, but I can only find it in the v1 documentation. Is there a similar solution for v2 or could you give me an idea as to how to resolve this without altering the distance/time weighting or a way to set the weighting by leg without requiring multiple requests?
Thank you,
John
I've stumbled upon an issue that I'm not quite sure what is the best approach to resolve. We are using xServer2 and we are calculating a route that we would like to be partially done by ferry (~200km total), but the server goes the long way around the water (~600 km).
This is my request:
Code: Select all
POST "https://xserver2.cloud.ptvgroup.com/services/rs/XRoute/experimental/calculateRoute"
{
"resultFields": {
"polyline": true,
"legs": {
"enabled": true,
"polyline": false,
"tollSummary": true
},
"toll": {
"enabled": true,
"sections": true,
"systems": true
},
"eventTypes": [
"TOLL_EVENT",
"COUNTRY_EVENT",
"ROUTE_VIOLATION_EVENT"
],
"segments": {
"enabled": true,
"polyline": true,
"featureThemeIds": [
"PTV_SpeedPatterns",
"PTV_TrafficIncidents"
]
}
},
"geometryOptions": {
"responseGeometryTypes": [
"PLAIN"
]
},
"routeOptions": {
"tollOptions": {
"useDetailedToll": true
},
"timeConsideration": {
"$type": "ExactTimeConsiderationAtStart",
"referenceTime": "2020-09-28T14:06:10+00:00"
}
},
"requestProfile": {
"featureLayerProfile": {
"themes": [
{
"id": "PTV_SpeedPatterns",
"enabled": true
},
{
"id": "PTV_TrafficIncidents",
"enabled": true
}
]
},
"routingProfile": {
"course": {
"toll": {
"tollPenalty": 0
},
"distanceTimeWeighting": 90
}
},
"vehicleProfile": {
"electronicTollCollectionSubscriptions": "NONE",
"engine": {
"emissionTechnology": "SELECTIVE_CATALYTIC_REDUCTION",
"emissionStandardEU": "EURO_EEV"
},
"axle": {
"axleLoad": 15,
"numberOfAxles": 5
},
"dimensions": {
"height": "380",
"heightAboveFrontAxle": 2.9,
"length": "1362",
"width": "255"
},
"weight": {
"emptyWeight": 18,
"loadWeight": 40
}
},
"currency": "EUR"
},
"coordinateFormat": "EPSG:4326",
"waypoints": [
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 10.881190312,
"y": 56.413471194
}
}
},
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 12.857498132,
"y": 56.672267934
}
}
},
{
"$type": "OffRoadWaypoint",
"location": {
"offRoadCoordinate": {
"x": 12.249170269,
"y": 57.107879628
}
}
}
]
}
- I tried playing around with the distanceTimeWeighting parameter but we can't really go anywhere lower than 83 (because it has other business implications) and we observed that only in the low 70's it chooses the ferry route.
- I tried setting waypoints at the start and end of the ferry and it still goes the long way around
From what I found in the documentation, there's a "Combined transport" type of waypoint that would basically force the routing by ferry, but I can only find it in the v1 documentation. Is there a similar solution for v2 or could you give me an idea as to how to resolve this without altering the distance/time weighting or a way to set the weighting by leg without requiring multiple requests?
Thank you,
John