Page 1 of 1

How to block roads in winter (mountain passes)?

Posted: Fri Aug 26, 2022 7:23 am
by Bernd Welter
Here's a little description how to block special roads such as mountain passes in wintertime.

xServer 1 - profile based
  • also mentioned in this article by Joost
  • Based on boolean segment attribute "blockedInWinter"
  • XML profile offers an attribute parameter blockedInWinterMalus
  • Advantage: Compareably easy, built-in visualization is possible (render profile supports parameters)
  • Disadvantage: you rely on the data - if a specific object such as a mountain pass isn't properly set in the data you can't use it.
xServer 2 - manual efforts required
  • As of today (August 2022) the routing API in the xServer 2 does not access the data properties.
  • You have to specify the relevant segments on your own via features such as Custom Feature Layer (on premise only) or GeographicRestrictions.prohibitedSegmentsByIntersectingPolylines
  • Advantage: more flexible - if you maintain the geomentries manually you can also add attributes such as "blocked from" and "blocked till" dates. Furthermore you can easily visualize the data - it is yours.
  • Disadvantage: you rely on the rough geometries you have picked.
The screenshots below use the GeographicRestriction. I manually gathered geographies at the entrance of the passes. the blue pins show the position of the "blockings"

:idea: Feel free to provide further relevant sections. Thanks to Beat for the trigger ;-)

Bernd

Re: How to block roads in winter (mountain passes)?

Posted: Tue Aug 30, 2022 8:09 am
by Bernd Welter
Just found this image based on 2018 TOMTOM data ;-) Nice coverage!

Re: How to block roads in winter (mountain passes)?

Posted: Mon Apr 29, 2024 8:18 am
by Bernd Welter
The routing from Bormio to Zernez. As there are time dependent PTV_TruckAttributes the time consideration has an impact on the geometry. I calculated the routes for 29.7.2024 and 29.01.2024 (windter - blocked)
The routing from Bormio to Zernez. As there are time dependent PTV_TruckAttributes the time consideration has an impact on the geometry. I calculated the routes for 29.7.2024 and 29.01.2024 (windter - blocked)

Code: Select all

{
  "waypoints": [
    {
      "location": {
        "coordinate": {
          "x": 10.37957,
          "y": 46.466862,
          "zSpecified": false
        },
        "considerAlternativeNearByRoads": false,
        "considerAlternativeNearByRoadsSpecified": true,
        "sideOfStreetRestrictionSpecified": false
      },
      "tourStopOptions": null,
      "vehicleParameters": null,
      "name": "OnRoadWaypoint[0]"
    },
    {
      "location": {
        "coordinate": {
          "x": 10.094610192,
          "y": 46.700290683,
          "zSpecified": false
        },
        "considerAlternativeNearByRoads": false,
        "considerAlternativeNearByRoadsSpecified": true,
        "sideOfStreetRestrictionSpecified": false
      },
      "tourStopOptions": null,
      "vehicleParameters": null,
      "name": "OnRoadWaypoint[1]"
    }
  ],
  "routeOptions": {
    "timeConsideration": {
      "referenceTime": "2024-07-29T09:35:30+02:00",
      "referenceTimeSpecified": true
    },
    "geographicRestrictions": {
      "searchSpaceBounds": null,
      "allowedCountries": null,
      "prohibitedCountries": null,
      "prohibitedSegmentsByIntersectingPolylines": null
    },
    "polylineOptions": {
      "elevations": false,
      "elevationsSpecified": true
    },
    "emissionOptions": null,
    "effectiveFuelConsumption": {
      "fleetSpecificAverageFuelConsumptionSpecified": false,
      "fleetSpecificAverageElectricityConsumptionSpecified": false,
      "routeSpecificAverageFuelConsumptionSpecified": false,
      "routeSpecificAverageElectricityConsumptionSpecified": false,
      "actualFuelConsumptionForThisRouteSpecified": false,
      "actualElectricityConsumptionForThisRouteSpecified": false
    },
    "tollOptions": {
      "useDetailedToll": true,
      "useDetailedTollSpecified": true,
      "returnZeroCosts": false,
      "returnZeroCostsSpecified": true
    },
    "tourRestrictions": null,
    "monetaryCostOptions": {
      "costPerKilometer": 1.2,
      "costPerKilometerSpecified": true,
      "workingCostPerHour": 20.5,
      "workingCostPerHourSpecified": true,
      "costPerFuelUnitSpecified": false,
      "costPerElectricityUnit": 1.6,
      "costPerElectricityUnitSpecified": true
    },
    "etaCalculationOptions": null,
    "exchangeRates": null,
    "contentSnapshotId": null,
    "highPerformanceRoutingNetworkId": null,
    "routingTypeSpecified": false,
    "calculationCriteria": 0,
    "calculationCriteriaSpecified": true,
    "binaryFeatureLayer": null,
    "currency": "EUR"
  },
  "resultFields": {
    "legs": {
      "enabled": true,
      "enabledSpecified": true,
      "polylineSpecified": false,
      "tollSummary": true,
      "tollSummarySpecified": true,
      "emissions": false,
      "emissionsSpecified": true,
      "providerIdsSpecified": false
    },
    "segments": {
      "featureThemeIds": [
        "PTV_TruckAttributes"
      ],
      "enabled": true,
      "enabledSpecified": true,
      "emissions": false,
      "emissionsSpecified": true,
      "polyline": true,
      "polylineSpecified": true,
      "descriptors": true,
      "descriptorsSpecified": true,
      "roadAttributes": true,
      "roadAttributesSpecified": true,
      "id": true,
      "idSpecified": true,
      "providerId": false,
      "providerIdSpecified": true
    },
    "eventTypes": [
      4
    ],
    "toll": {
      "enabled": true,
      "enabledSpecified": true,
      "sections": true,
      "sectionsSpecified": true,
      "systems": true,
      "systemsSpecified": true
    },
    "waypoints": true,
    "waypointsSpecified": true,
    "nodes": true,
    "nodesSpecified": true,
    "polyline": true,
    "polylineSpecified": true,
    "emissions": false,
    "emissionsSpecified": true,
    "report": true,
    "reportSpecified": true,
    "tourReport": false,
    "tourReportSpecified": true,
    "encodedPath": true,
    "encodedPathSpecified": true,
    "guidedNavigationRoute": false,
    "guidedNavigationRouteSpecified": true,
    "monetaryCostsReport": true,
    "monetaryCostsReportSpecified": true,
    "alternativeRoutes": false,
    "alternativeRoutesSpecified": true,
    "providerIds": false,
    "providerIdsSpecified": true
  },
  "requestProfile": {
    "vehicleProfile": {
      "engine": {
        "consumptionFactorsPerSpeed": null,
        "engineTypeSpecified": false,
        "cylinderCapacitySpecified": false,
        "fuelTypeSpecified": false,
        "electricityTypeSpecified": false,
        "bioFuelRatioSpecified": false,
        "hybridRatioSpecified": false,
        "dualFuelRatio": 0.0,
        "dualFuelRatioSpecified": true,
        "fuelConsumptionSpecified": false,
        "electricityConsumptionSpecified": false,
        "emissionTechnologySpecified": false,
        "particleFilterInstalledSpecified": false,
        "particleReductionClassSpecified": false,
        "emissionStandardEUSpecified": false,
        "emissionStandardAustraliaSpecified": false,
        "lowEmissionZoneTypes": null,
        "lowEmissionZoneExemptions": null,
        "co2EmissionClassEUSpecified": false
      },
      "weight": {
        "emptyWeightSpecified": false,
        "loadWeightSpecified": false,
        "totalPermittedWeightSpecified": false
      },
      "dimensions": {
        "heightSpecified": false,
        "heightAboveFrontAxleSpecified": false,
        "lengthSpecified": false,
        "widthSpecified": false,
        "kingpinToRearAxleSpecified": false
      },
      "axle": {
        "axleLoadSpecified": false,
        "numberOfAxlesSpecified": false,
        "numberOfTiresSpecified": false
      },
      "legalCondition": {
        "isEmergency": false,
        "isEmergencySpecified": true,
        "isDelivery": false,
        "isDeliverySpecified": true
      },
      "load": {
        "hazardousGoodsTypes": null,
        "loadTypeSpecified": false,
        "tunnelRestrictionCodeSpecified": false
      },
      "speeds": {
        "speedRangesByNetworkClass": null,
        "speedForLinkDistanceSpecified": false,
        "maximumSpeedSpecified": false
      },
      "driveTypeSpecified": false,
      "yearOfManufactureSpecified": false,
      "numberOfPassengersSpecified": false,
      "numberOfTrailersSpecified": false,
      "preferredRouteTypes": null,
      "unrestrictedRouteTypes": null,
      "restrictedRouteTypes": null,
      "highlyRestrictedRouteTypes": null,
      "prohibitedRouteTypes": null,
      "electronicTollCollectionSubscriptions": "AT_GOBOX"
    },
    "featureLayerProfile": {
      "parameters": [],
      "themes": [
        {
          "countrySpecificParameters": null,
          "featureResultProperties": null,
          "featureScenarios": null,
          "id": "PTV_TruckAttributes",
          "enabled": true,
          "enabledSpecified": true,
          "priorityLevelSpecified": false
        }
      ]
    },
    "routingProfile": {
      "linking": {
        "maximumDistanceToSegmentSpecified": false,
        "minimumNetworkClassSpecified": false,
        "maximumNetworkClassSpecified": false
      },
      "searchSpace": {
        "excludeByNetworkClass": null,
        "heuristicAggressivenessSpecified": false
      },
      "course": {
        "violations": {
          "enabled": false,
          "enabledSpecified": true,
          "costSpecified": false
        },
        "network": {
          "penaltiesByNetworkClass": null,
          "rampPenaltySpecified": false
        },
        "toll": {
          "tollPenaltySpecified": false
        },
        "specialAreas": {
          "residentsOnlyPenaltySpecified": false,
          "urbanPenaltySpecified": false,
          "minimumUrbanNetworkClassSpecified": false,
          "forbiddenLowEmissionZonePenaltySpecified": false,
          "deliveryOnlyPenaltySpecified": false,
          "deliveryOnlyGateCostSpecified": false,
          "seasonalClosurePenaltySpecified": false
        },
        "combinedTransport": {
          "boatPenaltySpecified": false,
          "railPenaltySpecified": false
        },
        "maneuver": {
          "intersectionTurnCosts": {
            "turnStrategySpecified": false,
            "customTurnStrategy": null
          },
          "uTurnCostSpecified": false,
          "highPerformanceRoutingUTurnCostSpecified": false,
          "considerTurningBans": false,
          "considerTurningBansSpecified": true,
          "useFastTurningBanHeuristic": false,
          "useFastTurningBanHeuristicSpecified": true
        },
        "distanceTimeWeightingSpecified": false
      }
    },
    "renderingProfile": null,
    "clusterPlanningProfile": null,
    "mapLanguage": null,
    "userLanguage": null
  },
  "geometryOptions": {
    "responseGeometryTypes": [
      0
    ]
  },
  "timeouts": {
    "queueingTimeoutSpecified": false,
    "computationTimeoutSpecified": false
  },
  "userLogs": [
    "XRouteToll2 Testclient",
    "Bernd.Welter@ptvgroup.com"
  ],
  "scope": "globalscope",
  "storedProfile": "truck7_49t",
  "coordinateFormat": null
}