cyang-kth / fmm

Fast map matching, an open source framework in C++
https://fmm-wiki.github.io/
Apache License 2.0
875 stars 205 forks source link

Add readme part for how to work with ubodt_gen #246

Closed iman4000 closed 1 year ago

iman4000 commented 2 years ago

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] I just download my .shp files from geofabrik but when i want to make output file with the command it gave me this error:

pio@fmm:~/fmm/example/command_line_example$ ubodt_gen ubodt_config_omp.xml
[info][ubodt_gen_app_config.cpp:28 ] Read configuration from xml file: ubodt_config_omp.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: ../data/gis_osm_roads_free_1.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][ubodt_gen_app_config.cpp:76 ] Delta 3
[info][ubodt_gen_app_config.cpp:77 ] Output file ../data/ubodt.txt
[info][ubodt_gen_app_config.cpp:78 ] Log level 2-info
[info][ubodt_gen_app_config.cpp:79 ] Use omp true
[info][ubodt_gen_app_config.cpp:80 ] ---- Print configuration done ----
[info][ubodt_gen_app_config.cpp:97 ] Validating configuration for UBODT construction
[warning][ubodt_gen_app_config.cpp:102] Overwrite result file ../data/ubodt.txt
[info][ubodt_gen_app_config.cpp:118] Validating done.
[info][network.cpp:72 ] Read network from file ../data/gis_osm_roads_free_1.shp
[critical][network.cpp:97 ] Field not found: id index -1, source index -1, target index -1
terminate called after throwing an instance of 'std::runtime_error'
  what():  Field not found: id index -1, source index -1, target index -1
Aborted (core dumped)

and i completely don't know what should i do...
can you please help me for this feature?

cyang-kth commented 1 year ago

I think you need to use network downloaded from osmnx which has topology information.

https://github.com/cyang-kth/fmm/issues/138

iman4000 commented 1 year ago

I did try lots of methods to make edges and nodes and only methods that is valid is python program you wrote that use osmnx! thanks for your help