-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to save the output while using the barefoot for offline map matching in scalable manner #140
Comments
Is the error related to the HMM break? (Are you aware of what the HMM break means?) Could you please provide the full log output? The problem may be in your code handling the HMM break in an appropriate manner ... (Please note that we can not give support in general for the integration of Barefoot in other libraries like Spark because the scope is just much too wide but I try help where it's possible.) |
Yes, the error is related to HMM error transitions. No state transmissions occurs when the result is empty but sequence and predecessors are not whereas no state emssions occurs when the result is empty. I am trying to run it on spark and mimic the code present on barefoot wiki. Here is the code for mapMatching.scala
//here is the BroadcastMatcher class
There are some map matched output in the file. The full log is as follows:- 19/09/26 14:25:08 INFO RoadMap: inserting roads ... 19/09/26 14:25:54 ERROR TaskSetManager: Task 1 in stage 4.0 failed 1 times; aborting job Driver stacktrace: Driver stacktrace: |
Which version do you use? Have you maybe modified the source code of Barefoot because I cannot map the stack trace to the code of the most recent version of Barefoot, i.e., in line 72 of com.bmwcarit.barefoot.matcher.MatcherKState there is no call of the sequence method of class com.bmwcarit.barefoot.markov.KState:
and in line 300 of com.bmwcarit.barefoot.markov.KState there is no call of an iterator method but a return statement:
|
val reader = new PostGISReader(host, port, name, "bfmap_ways", user, pass, Configuration.read(new JSONObject(config)) the com.bmwcarit.barefoot.road.Configuration class is missing in the new version. So I used 0.0.2 version. from which source, I should import configuration? |
Please use the most recent version of the library. I cannot give any support for older versions. The Configuration class has been replaced by the com.bmwcarit.barefoot.roadmap.Loader class. So you can use Loader.roadtypes(new JSONObject(config)) to do the same thing in newer versions. Please see the Javadocs: http://bmwcarit.github.io/barefoot/doc/0.1.0/com/bmwcarit/barefoot/roadmap/Loader.html |
Thanks for the reply. It means barefoot wiki is outdated as Configuration class is still used there for reading road-types.json. Also in the mvn-repository, the latest pom is 0.1.1 (https://mvnrepository.com/artifact/com.bmw-carit/barefoot/0.1.1) whereas on gitHub, it is 0.1.5. |
Is the problem solved? |
Yes, the problem is solved. I would suggest to modify the wiki page regarding "Loader.roadtypes(new JSONObject(config))". Thanks for your help! |
@Rajjat |
@ZhiWeiCui I'm also using spark to deploy this service, I'm having some troubles, I want to know more about your project details. |
I am using barefoot map matching algorithm for my Ph.D. project. While saving the output in the file, some matched traces are saved but after some time, it produces an error:-
19/09/25 16:50:02 INFO Filter: HMM break - no state transitions
19/09/25 16:50:02 ERROR Utils: Aborting task
java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1447)
Scala code for map matching as per git repo:-
Please help me out! Thanks.
The text was updated successfully, but these errors were encountered: