travel_utils.prepare_valhalla_network
travel_utils.prepare_valhalla_network(
osm_path,
output_dir=None,
output_name=None,
force_rebuild=False,
)
Build Valhalla routing tiles from an .osm.pbf file.
Parameters
| osm_path |
str or Path |
Path to .osm.pbf file. |
required |
| output_dir |
str or Path |
Directory to store Valhalla outputs. Defaults to a folder beside the OSM named after the file stem. |
None |
| output_name |
str |
Base name for generated outputs. Used for: - config file - tile directory - traffic extract Defaults to OSM filename stem. |
None |
| force_rebuild |
bool |
If True, rebuild even if outputs already exist. |
False |
Returns
|
dict |
{ “config_path”: …, “tile_dir”: …, “traffic_path”: … } |
Back to top