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
664 stars 185 forks source link

Matching Behaviour is incorrect #164

Open NitinSingh1812 opened 11 months ago

NitinSingh1812 commented 11 months ago

Hi Team,

I am trying to use barefoot with my custom map network & a set of GPS points. I am following the steps mentioned for distributed processing by Spark.

I am mapping BaseRoad(long id, long source, long target, long refid, boolean oneway, short type, float priority, float maxspeedForward, float maxspeedBackward, float length, Polyline geometry) to my Map edges, source vertex, target vertex, oneway and have set default values for type, priority, maxspeedForward and maxspeedBackward. I am creating the Polyline and computing the length by Polyline.calculateLengthIn2D.

I have created a custom implementation of RoadReader. I am creating MatcherSample list using a set of GPS Points.

The output in MatcherKState is completely off track and I am trying to understand what could be the problem since the Map co-ordinates are passed correctly.

image

As you can see from the above image, a small part of matching where dotted line represents GPS points & the solid lines show matched edges.

Is there something I should keep in mind before using a custom map network?