-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ubodt_gen command line program fails to create output file. #151
Comments
Please follow the tutorial https://github.com/cyang-kth/osm_mapmatching to download the edges.shp file rather than directly from osmnx because the default edges.shp saved by osmnx is still inconsistent with several issues, e.g., id field. The default edges.shp from OSMNX does not provide source, target, you need to rename those fields yourself. |
The two differences are
On this page https://github.com/cyang-kth/osm_mapmatching # We need an unique ID for each edge
gdf_edges["fid"] = gdf_edges.index The configuration of reading is also set as ### Read network data
network = Network("network/edges.shp","fid","u","v") |
Great! So if I understand correctly in order to produce a correct edges.shp, I need to change |
You can just keep the fid and specify it as the id name of shapefile You can check this link |
Great. I changed the ubodt_config.xml network tag, to :
And it worked. Though now the script has stacked here (maybe due to the size of the data?): [info][ubodt_gen_app_config.cpp:28 ] Read configuration from xml file: src/helpers/fmm/ubodt_config.xml |
Your delta equals 300km, which is too big, you can try 0.03 instead of 3. |
Great thanks, I will! |
I was able to produce the ubodt.txt file which got around 10 GB of storage in my disc. Then I tried to run the fmm command, though it took more than 5 minutes to finish, by only providing two coordinates to the algorithm. Is this normal? Is it possible to decrease the time drastically? Will changing k,r and e values help? The fmm command I ran was: which produced the output below: [info][fmm_app_config.cpp:49 ] Start reading FMM configuration from arguments The traj.csv file was: index;id;geom The fmm_output.txt was: id;cpath;mgeom |
That is normal, you can refer to the original paper for details. If you do not have a lot of GPS data or you have a quite large network, then you can use stmatch instead of fmm, which does not need the precomputation. #138 |
So If I understand correctly, using fmm algorithm is inefficient in time as well as storage terms in large networks. Is this correct? |
Yes, it needs to do precomputation and for large network, the UBODT size considerably increases, where fmm could be inefficient as a lot of the time is spent in reading the UBODT file. |
Thanks a lot! |
I am trying to run
ubodt_gen
command, providing an xml configuration file, using an edges.shp file I created via osmnx.In this process I get the error: [critical][network.cpp:112] Id, source or target column not found
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Id, source or target column not found
Abort trap: 6
The edges.shp file I am trying to process is:
edges.shp.zip
Below you may find all the logs of the ubodt_gen run:
ubodt_gen src/helpers/fmm/ubodt_config.xml
[info][ubodt_gen_app_config.cpp:28 ] Read configuration from xml file: src/helpers/fmm/ubodt_config.xml
[info][ubodt_gen_app_config.cpp:38 ] Read configuration from xml file done
[info][ubodt_gen_app_config.cpp:74 ] ---- Print configuration ----
[info][network_config.cpp:6 ] NetworkConfig
[info][network_config.cpp:7 ] File name: greece-attica/edges.shp
[info][network_config.cpp:8 ] ID name: id
[info][network_config.cpp:9 ] Source name: source
[info][network_config.cpp:10 ] Target name: target
[info][network_config.cpp:11 ] Mode name: drive
[info][ubodt_gen_app_config.cpp:76 ] Delta 3
[info][ubodt_gen_app_config.cpp:77 ] Output file ubodt.txt
[info][ubodt_gen_app_config.cpp:78 ] Log level 2-info
[info][ubodt_gen_app_config.cpp:79 ] Use omp false
[info][ubodt_gen_app_config.cpp:80 ] ---- Print configuration done ----
[info][ubodt_gen_app_config.cpp:97 ] Validating configuration for UBODT construction
[info][ubodt_gen_app_config.cpp:118] Validating done.
[info][network.cpp:91 ] Read network from file greece-attica/edges.shp
[critical][network.cpp:112] Id, source or target column not found
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Id, source or target column not found
Abort trap: 6
You may find the ubodt_config.xml below:
<?xml version="1.0" encoding="utf-8"?> <config> <input> <network> <file>greece-attica/edges.shp</file> <id>id</id> <source>source</source> <target>target</target> </network> </input> <parameters> <delta>3</delta> </parameters> <output> <file>ubodt.txt</file> </output> </config>
The text was updated successfully, but these errors were encountered: