bmwcarit / barefoot

Java map matching library for integrating the map into software and services with state-of-the-art online and offline map matching that can be used stand-alone and in the cloud.
Apache License 2.0
667 stars 186 forks source link

Can we use any road network with geometry instead of OSM? #149

Open asif-rehan opened 4 years ago

asif-rehan commented 4 years ago

As the title says, can I use any road network as the Map Data? Does the map matching code strictly depend on the OSM data?

Thank you!

ZhouShowfew commented 2 years ago

I'd like to ask the same question here, can we support road networks like GEOJSON instead of OSM?

Thank you!

GeoWonk commented 2 years ago

For the benefit of anyone else reading this, the easiest way to include non OSM data is to convert it into osm.xml with a tool like https://github.com/Rub21/geojson2osm and then change the import script to read-xml rather than read-pbf here. Two points is that conversion tool is incomplete or outdated so the xml needs to have a field for version with an integer (it can just be 1) and the changelog field should be an integer rather than a boolean. The second point is there needs to be a highway field (you can just rename a class field for instance in the geojson) with levels that correspond to the weights in roadtypes.json