add osrm-routed and node-osrm flags to configure mapmatching radius limit (#4721)
This commit is contained in:
@@ -53,12 +53,12 @@ template <typename Algorithm> class Engine final : public EngineInterface
|
||||
{
|
||||
public:
|
||||
explicit Engine(const EngineConfig &config)
|
||||
: route_plugin(config.max_locations_viaroute, config.max_alternatives), //
|
||||
table_plugin(config.max_locations_distance_table), //
|
||||
nearest_plugin(config.max_results_nearest), //
|
||||
trip_plugin(config.max_locations_trip), //
|
||||
match_plugin(config.max_locations_map_matching), //
|
||||
tile_plugin() //
|
||||
: route_plugin(config.max_locations_viaroute, config.max_alternatives), //
|
||||
table_plugin(config.max_locations_distance_table), //
|
||||
nearest_plugin(config.max_results_nearest), //
|
||||
trip_plugin(config.max_locations_trip), //
|
||||
match_plugin(config.max_locations_map_matching, config.max_radius_map_matching), //
|
||||
tile_plugin() //
|
||||
|
||||
{
|
||||
if (config.use_shared_memory)
|
||||
|
||||
@@ -84,6 +84,7 @@ struct EngineConfig final
|
||||
int max_locations_viaroute = -1;
|
||||
int max_locations_distance_table = -1;
|
||||
int max_locations_map_matching = -1;
|
||||
double max_radius_map_matching = -1.0;
|
||||
int max_results_nearest = -1;
|
||||
int max_alternatives = 3; // set an arbitrary upper bound; can be adjusted by user
|
||||
bool use_shared_memory = true;
|
||||
|
||||
@@ -24,8 +24,9 @@ class MatchPlugin : public BasePlugin
|
||||
using CandidateLists = routing_algorithms::CandidateLists;
|
||||
static const constexpr double RADIUS_MULTIPLIER = 3;
|
||||
|
||||
MatchPlugin(const int max_locations_map_matching)
|
||||
: max_locations_map_matching(max_locations_map_matching)
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -35,6 +36,7 @@ class MatchPlugin : public BasePlugin
|
||||
|
||||
private:
|
||||
const int max_locations_map_matching;
|
||||
const double max_radius_map_matching;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user