2015-03-03 06:01:40 -05:00
|
|
|
#ifndef MATCH_HPP
|
|
|
|
#define MATCH_HPP
|
2014-09-23 12:46:14 -04:00
|
|
|
|
2016-02-17 20:21:47 -05:00
|
|
|
#include "engine/api/match_parameters.hpp"
|
2016-05-27 15:05:04 -04:00
|
|
|
#include "engine/plugins/plugin_base.hpp"
|
2017-01-09 15:40:33 -05:00
|
|
|
#include "engine/routing_algorithms.hpp"
|
2016-01-02 11:13:44 -05:00
|
|
|
|
2016-02-12 18:23:33 -05:00
|
|
|
#include "util/json_util.hpp"
|
2014-09-23 12:46:14 -04:00
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace engine
|
|
|
|
{
|
|
|
|
namespace plugins
|
|
|
|
{
|
|
|
|
|
2016-02-20 22:27:26 -05:00
|
|
|
class MatchPlugin : public BasePlugin
|
2014-09-23 12:46:14 -04:00
|
|
|
{
|
2016-02-20 22:27:26 -05:00
|
|
|
public:
|
|
|
|
using SubMatching = map_matching::SubMatching;
|
2016-01-05 10:51:13 -05:00
|
|
|
using SubMatchingList = routing_algorithms::SubMatchingList;
|
|
|
|
using CandidateLists = routing_algorithms::CandidateLists;
|
2016-02-20 22:27:26 -05:00
|
|
|
static const constexpr double RADIUS_MULTIPLIER = 3;
|
2015-02-07 09:39:07 -05:00
|
|
|
|
2017-12-20 06:23:43 -05:00
|
|
|
MatchPlugin(const int max_locations_map_matching, const double max_radius_map_matching)
|
|
|
|
: max_locations_map_matching(max_locations_map_matching),
|
|
|
|
max_radius_map_matching(max_radius_map_matching)
|
2014-09-23 12:46:14 -04:00
|
|
|
{
|
2015-02-08 18:55:12 -05:00
|
|
|
}
|
|
|
|
|
2017-07-13 09:05:08 -04:00
|
|
|
Status HandleRequest(const RoutingAlgorithmsInterface &algorithms,
|
2016-10-05 19:05:03 -04:00
|
|
|
const api::MatchParameters ¶meters,
|
2019-08-02 10:40:55 -04:00
|
|
|
osrm::engine::api::ResultT &json_result) const;
|
2014-09-23 12:46:14 -04:00
|
|
|
|
|
|
|
private:
|
2016-10-14 09:55:21 -04:00
|
|
|
const int max_locations_map_matching;
|
2017-12-20 06:23:43 -05:00
|
|
|
const double max_radius_map_matching;
|
2014-09-23 12:46:14 -04:00
|
|
|
};
|
2020-11-26 10:21:39 -05:00
|
|
|
} // namespace plugins
|
|
|
|
} // namespace engine
|
|
|
|
} // namespace osrm
|
2016-01-05 10:51:13 -05:00
|
|
|
|
2015-03-03 06:01:40 -05:00
|
|
|
#endif // MATCH_HPP
|