cyang-kth / fmm

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

Common issues with using fmm on OpenStreetMap data #99

Open cyang-kth opened 4 years ago

cyang-kth commented 4 years ago

Although fmm supports taking OSM file as input, the original OSM data are not modified when reading network data (e.g., there is no split or merge performed for long edges). A common problem is that some OSM ways are not topologically connected as they should be.

For instance, the edge shown below comes from https://www.openstreetmap.org/way/137357449

image

It is supposed to be connected to this way.

https://www.openstreetmap.org/way/7974507

image

To create the correct topology, the above edge needs to be split at the intersection.

OSMNX seems to be able to handle this issue, the network downloaded from this instructions https://github.com/cyang-kth/osm_mapmatching using OSMNX is shown below.

image

For this reason, the function to directly run fmm on OSM file is removed from the program.

Therefore, it is still recommended to download a routable network following this tutorial using OSMNX https://github.com/cyang-kth/osm_mapmatching

The default setting of downloading the shapefile using OSMNX will not work due to some topology issues.