Routing options to use motorways and ferries
Posted: Wed Dec 08, 2021 1:35 pm
We are migrating from Mapserver to xServer 2 and routing with details like profiles, toll and emission does work. There are some remaining questions and one of them is regarding some routing profile options.
[x] Use motorway
Is this correct to use routingProfile::course::network::penaltiesByNetworkClass::penalties?
"[x] Use motorway" = 0 for the first network class
"[ ] Use motorway" = 2500 for the first network class
[x] Use residential roads
Is this correct to use routingProfile::course::network::penaltiesByNetworkClass::penalties as well? What is the network class for this case?
[x] Use ferries
Is this correct to use routingProfile::course::combinedTransport::boatPenalty?
"[x] Use ferries" = 0
"[ ] Use ferries" = 2500
Our option (bool) | Mapserver | xServer 2 |
---|---|---|
[x] Use motorway | IRouteOptions2::put_RouteWithoutAutoroute(section, [true|false]) Mapserver SDK documentation: "For the VARIANT_TRUE value the use of motorways is not permitted." | Use penaltiesByNetworkClass? NC0? Which penalty? |
[x] Use residential roads | IDrivingOptions_5_4_0_0::put_ResidentsOnlyFactor(section, factor) Mapserver SDK documentation: "factor Modifier for streets that are restricted to residents" "The values range from -99 (strong preference) to 0 (normal rating) to 2500 (strong avoidance). 2501 can be used to block streets that are restricted to residents completely. " We do use the default value (0) when the option is checked and 2500 when the option is not checked. |
Use penaltiesByNetworkClass? Which NC? |
[x] Use ferries | IDrivingOptions_5_4_0_0::put_FerryFactor(section, factor) Mapserver SDK documentation: "Modifier for ferries." "The values range from -99 (strong preference) to 0 (normal rating) to 2500 (strong avoidance). 2501 can be used to block ferries completely." We do use 0 when the option is checked and 2500 when the option is not checked. | Use boatPenalty? |
Code: Select all
{
"routingProfile": {
"course": {
"network": {
"penaltiesByNetworkClass": {
"penalties": [
THIS_VALUE_HERE_QUESTIONMARK,
10,
15,
35,
40,
90,
100,
100
]
}
}
}
}
}
"[x] Use motorway" = 0 for the first network class
"[ ] Use motorway" = 2500 for the first network class
[x] Use residential roads
Is this correct to use routingProfile::course::network::penaltiesByNetworkClass::penalties as well? What is the network class for this case?
[x] Use ferries
Code: Select all
{
"routingProfile": {
"course": {
"combinedTransport": {
"boatPenalty": "THIS_VALUE_HERE_QUESTIONMARK"
}
}
}
}
"[x] Use ferries" = 0
"[ ] Use ferries" = 2500