Skip to content

Commit

Permalink
Made base_network and build_osm_network function more robust for empt…
Browse files Browse the repository at this point in the history
…y links.
  • Loading branch information
bobbyxng committed Jul 10, 2024
1 parent 0b5a1fe commit e0ae315
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/build_osm_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ def build_network(

if links.empty: # create empty dataframe with cols_links as columns
links = pd.DataFrame(columns=["link_id"] + cols_links)
links.set_index("link_id", inplace=True)

to_csv_nafix(lines, outputs["lines"], quotechar="'") # Generate CSV
to_csv_nafix(links, outputs["links"], quotechar="'") # Generate CSV
Expand Down

0 comments on commit e0ae315

Please sign in to comment.