Adds support for a new b= parameter on the viaroute and match
plugins, allowing for better nearest neighbor matching when a heading is known.
This commit is contained in:
committed by
Patrick Niklaus
parent
7015ed203a
commit
d07c0bde80
@@ -99,7 +99,8 @@ template <class EdgeDataT> class BaseDataFacade
|
||||
virtual bool
|
||||
IncrementalFindPhantomNodeForCoordinate(const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<PhantomNode> &resulting_phantom_node_vector,
|
||||
const unsigned number_of_results) = 0;
|
||||
const unsigned number_of_results,
|
||||
const int bearing = 0, const int bearing_range = 180) = 0;
|
||||
|
||||
virtual bool
|
||||
IncrementalFindPhantomNodeForCoordinate(const FixedPointCoordinate &input_coordinate,
|
||||
@@ -107,7 +108,7 @@ template <class EdgeDataT> class BaseDataFacade
|
||||
virtual bool IncrementalFindPhantomNodeForCoordinateWithMaxDistance(
|
||||
const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
|
||||
const double max_distance) = 0;
|
||||
const double max_distance, const int bearing = 0, const int bearing_range = 180) = 0;
|
||||
|
||||
virtual unsigned GetCheckSum() const = 0;
|
||||
|
||||
|
||||
@@ -388,7 +388,8 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
bool
|
||||
IncrementalFindPhantomNodeForCoordinate(const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<PhantomNode> &resulting_phantom_node_vector,
|
||||
const unsigned number_of_results) override final
|
||||
const unsigned number_of_results,
|
||||
const int bearing = 0, const int range = 180) override final
|
||||
{
|
||||
if (!m_static_rtree.get())
|
||||
{
|
||||
@@ -396,13 +397,15 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
}
|
||||
|
||||
return m_static_rtree->IncrementalFindPhantomNodeForCoordinate(
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results);
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results, bearing, range);
|
||||
}
|
||||
|
||||
bool IncrementalFindPhantomNodeForCoordinateWithMaxDistance(
|
||||
const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
|
||||
const double max_distance) override final
|
||||
const double max_distance,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) override final
|
||||
{
|
||||
if (!m_static_rtree.get())
|
||||
{
|
||||
@@ -410,7 +413,7 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
}
|
||||
|
||||
return m_static_rtree->IncrementalFindPhantomNodeForCoordinateWithDistance(
|
||||
input_coordinate, resulting_phantom_node_vector, max_distance);
|
||||
input_coordinate, resulting_phantom_node_vector, max_distance, bearing, bearing_range);
|
||||
}
|
||||
|
||||
unsigned GetCheckSum() const override final { return m_check_sum; }
|
||||
|
||||
@@ -409,7 +409,8 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
bool
|
||||
IncrementalFindPhantomNodeForCoordinate(const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<PhantomNode> &resulting_phantom_node_vector,
|
||||
const unsigned number_of_results) override final
|
||||
const unsigned number_of_results,
|
||||
const int bearing = 0, const int range = 180) override final
|
||||
{
|
||||
if (!m_static_rtree.get() || CURRENT_TIMESTAMP != m_static_rtree->first)
|
||||
{
|
||||
@@ -417,13 +418,15 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
}
|
||||
|
||||
return m_static_rtree->second->IncrementalFindPhantomNodeForCoordinate(
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results);
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results, bearing, range);
|
||||
}
|
||||
|
||||
bool IncrementalFindPhantomNodeForCoordinateWithMaxDistance(
|
||||
const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
|
||||
const double max_distance) override final
|
||||
const double max_distance,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) override final
|
||||
{
|
||||
if (!m_static_rtree.get() || CURRENT_TIMESTAMP != m_static_rtree->first)
|
||||
{
|
||||
@@ -431,7 +434,7 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
}
|
||||
|
||||
return m_static_rtree->second->IncrementalFindPhantomNodeForCoordinateWithDistance(
|
||||
input_coordinate, resulting_phantom_node_vector, max_distance);
|
||||
input_coordinate, resulting_phantom_node_vector, max_distance, bearing, bearing_range);
|
||||
}
|
||||
|
||||
unsigned GetCheckSum() const override final { return m_check_sum; }
|
||||
|
||||
Reference in New Issue
Block a user