Skip to content

Commit e3db705

Browse files
ModellerModeller
Modeller
authored and
Modeller
committed
Fix (for now) to deal with Geopandas and reading from file GDBs.
1 parent dfa3bdf commit e3db705

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build_network.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pyogrio
12
import pyexpat as expat
23
import time
34
import geopandas as gpd
@@ -497,6 +498,10 @@ def nodes_to_retain(edges, config):
497498
model_links.rename(columns={"id" : "link_id"}, inplace = True)
498499

499500
if config["save_network_files"]:
501+
# using pyogrio driver was causing an error here.
502+
# but need to use it earlier to import from file gdb.
503+
gpd.options.io_engine = "fiona"
504+
500505
model_nodes.to_file(
501506
os.path.join(dir, time_period + "_junctions.shp"),
502507
driver="ESRI Shapefile",

0 commit comments

Comments
 (0)