Allow private access for travel only if it is the origin or destination

This way is tagged as access=military. Unlike for access=private there is no built-in way that you can use to open up military roads. But this should be easy to do with some modification of the Java code. You could add a similar option (car|block_military=false) that you would implement just like block_private:

or simply unblock military when block_private=false, or even more simple just remove military from the list of restricted values altogether here:

We will try and remove it from the below, as we dont want to transverse military bases unless they are the destination. Does something like this look right?

graph.vehicles: car|block_private=false|block_military=false
profiles:
  - name: car
    vehicle: car
    weighting: custom
    custom_model: {
        "distance_influence": 70,
        "priority": [
          { "if": "road_access == PRIVATE || road_access == DESTINATION", "multiply_by": 0.001 }
          { "if": "road_access == MILITARY || road_access == DESTINATION", "multiply_by": 0.001 }
        ]
    }

To be able to use it in the custom model you probably have to add MILITARY to the RoadAccess.java enum as well.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.