Class MapMatching

java.lang.Object
com.graphhopper.matching.MapMatching

public class MapMatching extends Object
This class matches real world GPX entries to the digital road network stored in GraphHopper. The Viterbi algorithm is used to compute the most likely sequence of map matching candidates. The Viterbi algorithm takes into account the distance between GPX entries and map matching candidates as well as the routing distances between consecutive map matching candidates.

See http://en.wikipedia.org/wiki/Map_matching and Newson, Paul, and John Krumm. "Hidden Markov map matching through noise and sparseness." Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems. ACM, 2009.

Author:
Peter Karich, Michael Zilske, Stefan Holder, kodonnell
  • Constructor Details

  • Method Details

    • fromGraphHopper

      public static MapMatching fromGraphHopper(GraphHopper graphHopper, PMap hints)
    • routerFromGraphHopper

      public static MapMatching.Router routerFromGraphHopper(GraphHopper graphHopper, PMap hints)
    • setTransitionProbabilityBeta

      public void setTransitionProbabilityBeta(double transitionProbabilityBeta)
      Beta parameter of the exponential distribution for modeling transition probabilities.
    • setMeasurementErrorSigma

      public void setMeasurementErrorSigma(double measurementErrorSigma)
      Standard deviation of the normal distribution [m] used for modeling the GPS error.
    • match

      public MatchResult match(List<Observation> observations)
    • filterObservations

      public List<Observation> filterObservations(List<Observation> observations)
      Filters observations to only those which will be used for map matching (i.e. those which are separated by at least 2 * measurementErrorSigman
    • findCandidateSnaps

      public List<Snap> findCandidateSnaps(double queryLat, double queryLon)
    • getStatistics

      public Map<String,Object> getStatistics()