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
665 stars 186 forks source link

Road information available on online tracking? #72

Open argltuc opened 6 years ago

argltuc commented 6 years ago

With the format option "slimjson" barefoot map matcher returns information about the used road, which can now set in relation to an OSM path (like it's done in #13)

Since I want to work with the online tracker, I wonder that there is no format option to get as well with the tracker the road information. Is there an option, to extend the output of the online tracker, which I just missed? In addition could it be possible to return directly the OSM ID, which would we be more usefull for post processing than the internal and variable barefoot gid?

Thanks in advance for your help. Cheers, Arne

smattheis commented 6 years ago

Since the tracker is meant to be used for larger numbers of vehicles, it transfers only a minimum of data, see MatcherKState#toMonitorJSON() in https://github.com/bmwcarit/barefoot/blob/master/src/main/java/com/bmwcarit/barefoot/matcher/MatcherKState.java You would need to customize this function to include data that you need.

argltuc commented 6 years ago

Alright, thanks for your advice. When I study your source code, to find out, how I can customize it at the best way, I found a function toOSMJSON which seems to be unused and undocumented. It seems to be really useful, since you can get directly the connection between your position and the OSM node/way ID. Why is this function not used as an additional matcher output function?

smattheis commented 6 years ago

I will check that out.