pedrocamargo / map_matching

Map matching
Apache License 2.0
35 stars 12 forks source link

File missing 'example_data/FAF_Network.shp' #14

Open vishnudas-bluefox opened 2 years ago

vishnudas-bluefox commented 2 years ago

i converted the whole code to pyhton3 and reconfigure the importing after the conversion am getting an error with a missing file I assume please refer the error as soon as possible

github: https://github.com/vishnudas-bluefox/map_matching new pull : #13

Creating graph from shapefile Traceback (most recent call last): File " example.py", line 41, in net.load_network('example_data/FAF_Network.shp', p) File "/home/user/Desktop/Adhil/test/map_matching/map_matching/network.py", line 64, in load_network self.graph.create_from_geography(network_file, link_id, direction, cost_field, skims) File "/home/user/Desktop/Adhil/test/map_matching/map_matching/aequilibrae/graph.py", line 101, in create_from_geography geo_file_records = shapefile.Reader(geo_file) File "/home/user/Desktop/Adhil/map_matching/venv/lib/python3.8/site-packages/shapefile.py", line 1045, in init self.load(path) File "/home/user/Desktop/Adhil/map_matching/venv/lib/python3.8/site-packages/shapefile.py", line 1190, in load raise ShapefileException("Unable to open %s.dbf or %s.shp." % (shapeName, shapeName)) shapefile.ShapefileException: Unable to open example_data/FAF_Network.dbf or example_data/FAF_Network.shp.

pedrocamargo commented 2 years ago

Aequilibrae no longer supports loading the network from a shapefile

vishnudas-bluefox commented 2 years ago

was there any solution? like any alternative libraries or something?

pedrocamargo commented 2 years ago

No. The solution is to either build the graph from a Pandas DataFrame (you will need a_node/b_node in that graph) or to build an AequilibraE model from your shapefile and grab the graph directly from AequilibraE