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

Changeable radius while running instance #79

Open dvent7 opened 6 years ago

dvent7 commented 6 years ago

Hello,

I wanted to change the search radius for roads in special cases. e.g. tunnels/bridges or beacons. But when I have multiple threads which are using the https://github.com/bmwcarit/barefoot/blob/master/src/main/java/com/bmwcarit/barefoot/matcher/Matcher.java class, then setting the radius will have also effects on other threads which are using the same map/matcher.

Therefore I suggest to add an optional additonal parameter for the Method execute https://github.com/bmwcarit/barefoot/blob/c7b55daab5fe14c3e0b02f9e76e22ca509633ac4/src/main/java/com/bmwcarit/barefoot/markov/Filter.java#L114

which uses this parameter for finding candidates (https://github.com/bmwcarit/barefoot/blob/c7b55daab5fe14c3e0b02f9e76e22ca509633ac4/src/main/java/com/bmwcarit/barefoot/markov/Filter.java#L127)
smattheis commented 6 years ago

Sorry for the delay. Is this still an open issue? The radius could be adapted based on the samples. I see that the abstract Filter class may be a design flaw for this use case but you could still derive the Matcher class and adapt the radius based on properties of the sample. If you need more details on how to accomplish this please let me know.