Skip to content

Commit

Permalink
Use motorway specific damage function
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-fred committed Feb 12, 2024
1 parent 8409f4b commit 1022538
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/open_gira/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ class RoadAssets(Assets):
UNPAVED = "road_unpaved",
PAVED = "road_paved",
BRIDGE = "road_bridge"
MOTORWAY = "road_motorway"
2 changes: 2 additions & 0 deletions workflow/transport/create_road_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def annotate_condition(network: snkit.network.Network) -> snkit.network.Network:

# select and label assets with their type
# the asset_type is used to later select a damage curve
# note that order is important here, if an edge is paved, motorway and a bridge, it will be tagged as a bridge only
network.edges.loc[network.edges.paved == False, 'asset_type'] = RoadAssets.UNPAVED
network.edges.loc[network.edges.paved == True, 'asset_type'] = RoadAssets.PAVED
network.edges.loc[network.edges.tag_highway == 'motorway', 'asset_type'] = RoadAssets.MOTORWAY
network.edges.loc[network.edges.bridge == True, 'asset_type'] = RoadAssets.BRIDGE

logging.info("Writing network to disk")
Expand Down

0 comments on commit 1022538

Please sign in to comment.