Review fixes
This commit is contained in:
parent
b95a58591d
commit
497709da13
@ -280,7 +280,7 @@ In addition to the [general options](#general-options) the following options are
|
||||
|timestamps |`{timestamp};{timestamp}[;{timestamp} ...]` |Timestamps for the input locations in seconds since UNIX epoch. Timestamps need to be monotonically increasing. |
|
||||
|radiuses |`{radius};{radius}[;{radius} ...]` |Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy.|
|
||||
|gaps |`split` (default), `ignore` |Allows the input track splitting based on huge timestamp gaps between points. |
|
||||
|tidying |`true`, `false` (default) |Allows the input track modification to obtain better matching quality for noisy tracks. |
|
||||
|tidy |`true`, `false` (default) |Allows the input track modification to obtain better matching quality for noisy tracks. |
|
||||
|
||||
|Parameter |Values |
|
||||
|------------|-----------------------------------|
|
||||
|
@ -62,7 +62,7 @@ Feature: Basic Map Matching
|
||||
Given a grid size of 100 meters
|
||||
|
||||
Given the query options
|
||||
| tidying | true |
|
||||
| tidy | true |
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
@ -82,7 +82,7 @@ Feature: Basic Map Matching
|
||||
Given a grid size of 100 meters
|
||||
|
||||
Given the query options
|
||||
| tidying | true |
|
||||
| tidy | true |
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
@ -102,7 +102,7 @@ Feature: Basic Map Matching
|
||||
Given a grid size of 8 meters
|
||||
|
||||
Given the query options
|
||||
| tidying | true |
|
||||
| tidy | true |
|
||||
|
||||
Given the node map
|
||||
"""
|
||||
|
@ -63,23 +63,20 @@ struct MatchParameters : public RouteParameters
|
||||
RouteParameters::GeometriesType::Polyline,
|
||||
RouteParameters::OverviewType::Simplified,
|
||||
{}),
|
||||
gaps_processing(GapsType::Split), use_tidying(false)
|
||||
gaps(GapsType::Split), tidy(false)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
MatchParameters(std::vector<unsigned> timestamps_,
|
||||
GapsType gaps_processing_,
|
||||
bool use_tidying_,
|
||||
Args... args_)
|
||||
MatchParameters(std::vector<unsigned> timestamps_, GapsType gaps_, bool tidy_, Args... args_)
|
||||
: RouteParameters{std::forward<Args>(args_)...}, timestamps{std::move(timestamps_)},
|
||||
gaps_processing(gaps_processing_), use_tidying(use_tidying_)
|
||||
gaps(gaps_), tidy(tidy_)
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<unsigned> timestamps;
|
||||
GapsType gaps_processing;
|
||||
bool use_tidying;
|
||||
GapsType gaps;
|
||||
bool tidy;
|
||||
|
||||
bool IsValid() const
|
||||
{
|
||||
|
@ -38,13 +38,11 @@ struct MatchParametersGrammar final : public RouteParametersGrammar<Iterator, Si
|
||||
|
||||
root_rule =
|
||||
BaseGrammar::query_rule(qi::_r1) > -qi::lit(".json") >
|
||||
-('?' >
|
||||
(timestamps_rule(qi::_r1) | BaseGrammar::base_rule(qi::_r1) |
|
||||
-('?' > (timestamps_rule(qi::_r1) | BaseGrammar::base_rule(qi::_r1) |
|
||||
(qi::lit("gaps=") >
|
||||
gaps_type[ph::bind(&engine::api::MatchParameters::gaps_processing, qi::_r1) =
|
||||
qi::_1]) |
|
||||
(qi::lit("tidying=") > qi::bool_[ph::bind(&engine::api::MatchParameters::use_tidying,
|
||||
qi::_r1) = qi::_1])) %
|
||||
gaps_type[ph::bind(&engine::api::MatchParameters::gaps, qi::_r1) = qi::_1]) |
|
||||
(qi::lit("tidy=") >
|
||||
qi::bool_[ph::bind(&engine::api::MatchParameters::tidy, qi::_r1) = qi::_1])) %
|
||||
'&');
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ Status MatchPlugin::HandleRequest(const datafacade::ContiguousInternalMemoryData
|
||||
|
||||
SubMatchingList sub_matchings;
|
||||
api::tidy::Result tidied;
|
||||
if (parameters.use_tidying)
|
||||
if (parameters.tidy)
|
||||
{
|
||||
// Transparently tidy match parameters, do map matching on tidied parameters.
|
||||
// Then use the mapping to restore the original <-> tidied relationship.
|
||||
@ -207,7 +207,7 @@ Status MatchPlugin::HandleRequest(const datafacade::ContiguousInternalMemoryData
|
||||
tidied.parameters.coordinates,
|
||||
tidied.parameters.timestamps,
|
||||
tidied.parameters.radiuses,
|
||||
parameters.gaps_processing == api::MatchParameters::GapsType::Split);
|
||||
parameters.gaps == api::MatchParameters::GapsType::Split);
|
||||
|
||||
if (sub_matchings.size() == 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user