How to block roads in winter (mountain passes)?

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2575
Joined: Mon Apr 14, 2014 10:28 am
Contact:

How to block roads in winter (mountain passes)?

Post 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
Attachments
Umbrail Pass between Santa Maria and Bormio<br />Linestring(10.429939 46.598977,10.431268 46.599247)<br />Linestring(10.407349 46.516695,10.409299 46.519348)<br />https://en.wikipedia.org/wiki/Umbrail_Pass
Umbrail Pass between Santa Maria and Bormio
Linestring(10.429939 46.598977,10.431268 46.599247)
Linestring(10.407349 46.516695,10.409299 46.519348)
https://en.wikipedia.org/wiki/Umbrail_Pass
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... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2575
Joined: Mon Apr 14, 2014 10:28 am
Contact:

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

Post by Bernd Welter »

Just found this image based on 2018 TOMTOM data ;-) Nice coverage!
Attachments
statistics
statistics
visual...
visual...
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... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2575
Joined: Mon Apr 14, 2014 10:28 am
Contact:

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

Post 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
}
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... :twisted:
Post Reply