cyang-kth / fmm

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

Not able to run on osm data #184

Closed cvmlddev closed 3 years ago

cvmlddev commented 3 years ago

Note Before posting an issue about bug in the program

Describe the bug The documentation mentions that fmm can now process osm files as well. I downloaded osm.pbf file https://download.geofabrik.de/index.html.

Following the documentation I ran stmatch --network custom.osm.pbf --gps custom.csv -k 16 -r 0.005 -e 0.0005 --vmax 0.0002 --output mr.txt It gives the error [critical][network_config.cpp:65 ] Network format not recognized india.osm.pbf

Expected behavior It should be able to process OSM files as well Screenshots If applicable, add screenshots to help explain your problem.

ziXet commented 3 years ago

You should follow this Tutorial: https://github.com/cyang-kth/osm_mapmatching

I think you no longer will be able to use osm .pbf file directly.

If you follow the tutorial, you'll see the for osm maps, it uses osmnx to download the graph.

cyang-kth commented 3 years ago

The reason for removing the support of osm file is that it generally contains topology issues as described here https://github.com/cyang-kth/fmm/issues/99.

cvmlddev commented 3 years ago

Would it work if we convert osm to shapeFile format?(.osm -> .geojson -> .shp)

cyang-kth commented 3 years ago

No, you have to use some advanced tool to build the topology like osmnx, other conversion only stores the data in a different format so it won't work.