Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions script/map_modal_metric.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@

# Highways that are not walk/bike eligible for modal metrics (still kept in RTree).
MAJOR_UNWALKABLE_HIGHWAYS = {
'motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link',
}

def metric_value_or_none(highway, value):
"""Write None for major unwalkable/unbikeable ways in WCI/LTS outputs."""
hw = (highway or '').split('.')[0].lower()
if hw in MAJOR_UNWALKABLE_HIGHWAYS:
return None
return value

"""Create interactive Modal Metric maps (e.g., WCI, LTS) from merged edge CSV files."""

# Usage:
Expand Down