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
671 stars 183 forks source link

Matcher Server SUCCESS but return empty coordinates list #46

Closed wuyujack closed 7 years ago

wuyujack commented 7 years ago

I am using the dataset from Hengfeng Li project people.eng.unimelb.edu.au/henli/projects/map-matching and the dataset is here http://people.eng.unimelb.edu.au/henli/projects/map-matching/gps_track.txt. I start the Matcher Server and run the code user@user-VirtualBox:~/barefoot$ python util/submit/batch.py --host localhost --port 1235 --file test.json where the contents of test.json are [ {"id":"1","time":1381601722,"point":"POINT(144.947925 -37.798779)"}, {"id":"2","time":1381601723,"point":"POINT(144.947900 -37.798449)"}, {"id":"3","time":1381601724,"point":"POINT(144.947885 -37.798749)"} ]

The Matcher Server is successfully set up but return empty coordinates list. user@user-VirtualBox:~/barefoot$ python util/submit/batch.py --host localhost --port 1235 --file test.json SUCCESS {"coordinates":[],"type":"MultiLineString"} Are there something wrong with my setup? I use the melbourne.osm.pbf file from https://mapzen.com/data/metro-extracts/metro/melbourne_australia/ and the default road-types.json

smattheis commented 7 years ago

The time must be provided in milliseconds, which means that you need to add "000" to each of the timestamps. I also receive an empty result; after I change the timestamps to milliseconds I receive:

{"coordinates":[[[144.9479387248094,-37.7987022621741],[144.94785636202997,-37.79869298713149]],[[144.94785636202997,-37.79869298713149],[144.94785636202997,-37.79869298713149]]],"type":"MultiLineString"}

(To see the result, copy and paste it to geojson.io)

smattheis commented 7 years ago

Does that solve the problem?

wuyujack commented 7 years ago

@smattheis Thank you so much! I left my office and now I figure it out!

wuyujack commented 7 years ago

@smattheis I found the solution to overcome it :), it just a linux skill, thank you so much!