2015-02-26 12:50:18 -05:00
|
|
|
#ifndef MAP_MATCHING_HPP
|
|
|
|
#define MAP_MATCHING_HPP
|
2014-09-23 12:46:14 -04:00
|
|
|
|
2017-01-09 15:40:33 -05:00
|
|
|
#include "engine/algorithm.hpp"
|
2017-02-24 20:24:21 -05:00
|
|
|
#include "engine/datafacade/contiguous_internalmem_datafacade.hpp"
|
2016-05-27 15:05:04 -04:00
|
|
|
#include "engine/map_matching/sub_matching.hpp"
|
2017-02-24 20:24:21 -05:00
|
|
|
#include "engine/search_engine_data.hpp"
|
2016-02-20 22:27:26 -05:00
|
|
|
|
2015-09-18 08:26:32 -04:00
|
|
|
#include <vector>
|
2014-09-23 12:46:14 -04:00
|
|
|
|
2015-03-03 06:48:33 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace engine
|
|
|
|
{
|
|
|
|
namespace routing_algorithms
|
2014-09-23 12:46:14 -04:00
|
|
|
{
|
2015-02-17 06:22:11 -05:00
|
|
|
|
2015-12-09 16:34:22 -05:00
|
|
|
using CandidateList = std::vector<PhantomNodeWithDistance>;
|
2015-02-17 06:22:11 -05:00
|
|
|
using CandidateLists = std::vector<CandidateList>;
|
2016-02-20 22:27:26 -05:00
|
|
|
using SubMatchingList = std::vector<map_matching::SubMatching>;
|
2017-01-09 15:40:33 -05:00
|
|
|
static const constexpr double DEFAULT_GPS_PRECISION = 5;
|
|
|
|
|
2017-02-24 21:22:17 -05:00
|
|
|
template <typename AlgorithmT>
|
|
|
|
SubMatchingList mapMatching(SearchEngineData &,
|
|
|
|
const datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT> &,
|
|
|
|
const CandidateLists &,
|
|
|
|
const std::vector<util::Coordinate> &,
|
|
|
|
const std::vector<unsigned> &,
|
|
|
|
const std::vector<boost::optional<double>> &)
|
|
|
|
{
|
|
|
|
throw util::exception(std::string("mapMatching is not implemented for ") +
|
|
|
|
typeid(AlgorithmT).name());
|
|
|
|
}
|
|
|
|
|
2017-02-24 20:24:21 -05:00
|
|
|
SubMatchingList
|
|
|
|
mapMatching(SearchEngineData &engine_working_data,
|
|
|
|
const datafacade::ContiguousInternalMemoryDataFacade<algorithm::CH> &facade,
|
|
|
|
const CandidateLists &candidates_list,
|
|
|
|
const std::vector<util::Coordinate> &trace_coordinates,
|
|
|
|
const std::vector<unsigned> &trace_timestamps,
|
|
|
|
const std::vector<boost::optional<double>> &trace_gps_precision);
|
2017-02-25 00:13:38 -05:00
|
|
|
|
|
|
|
SubMatchingList
|
|
|
|
mapMatching(SearchEngineData &engine_working_data,
|
|
|
|
const datafacade::ContiguousInternalMemoryDataFacade<algorithm::CoreCH> &facade,
|
|
|
|
const CandidateLists &candidates_list,
|
|
|
|
const std::vector<util::Coordinate> &trace_coordinates,
|
|
|
|
const std::vector<unsigned> &trace_timestamps,
|
|
|
|
const std::vector<boost::optional<double>> &trace_gps_precision);
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-27 05:17:19 -05:00
|
|
|
//[1] "Hidden Markov Map Matching Through Noise and Sparseness"; P. Newson and J. Krumm; 2009; ACM
|
2015-03-03 05:48:15 -05:00
|
|
|
// GIS
|
2014-09-23 12:46:14 -04:00
|
|
|
|
2015-02-26 12:50:18 -05:00
|
|
|
#endif /* MAP_MATCHING_HPP */
|