mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-03 11:23:48 +00:00
[traffic] Ignore access flags when decoding closure events
Fixes decoding of closures which are mapped in OSM as access restrictions Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -144,6 +144,18 @@ public:
|
||||
*/
|
||||
virtual double GetFerryLandingPenalty(Purpose purpose) const = 0;
|
||||
|
||||
/**
|
||||
* @brief Whether access restrictions are ignored.
|
||||
*
|
||||
* A return value of false indicates that access restrictions should be observed, which is the
|
||||
* default behavior for a routing use case. If true, it indicates that routing should ignore
|
||||
* access restrictions. This is needed to resolve traffic message locations; it could also be
|
||||
* used e.g. for emergency vehicle use cases.
|
||||
*
|
||||
* This implementation always returns false.
|
||||
*/
|
||||
virtual bool IsAccessIgnored() { return false; }
|
||||
|
||||
/**
|
||||
* @brief Creates an `EdgeEstimator` based on maximum speeds.
|
||||
*
|
||||
|
||||
@@ -217,6 +217,9 @@ template <typename AccessPositionType>
|
||||
bool IndexGraph::IsAccessNoForSure(AccessPositionType const & accessPositionType, RouteWeight const & weight,
|
||||
bool useAccessConditional) const
|
||||
{
|
||||
if (m_estimator->IsAccessIgnored())
|
||||
return false;
|
||||
|
||||
auto const [accessType, confidence] = useAccessConditional
|
||||
? m_roadAccess.GetAccess(accessPositionType, weight)
|
||||
: m_roadAccess.GetAccessWithoutConditional(accessPositionType);
|
||||
|
||||
Reference in New Issue
Block a user