From bebac8d8a73bf7426e680c6a2f462d662e3343e6 Mon Sep 17 00:00:00 2001 From: mvglasow Date: Fri, 25 Jul 2025 17:25:17 +0300 Subject: [PATCH] [traffxml] Remove openlr dependency, disable OpenLrV3TraffDecoder Signed-off-by: mvglasow --- qt/CMakeLists.txt | 1 - traffxml/CMakeLists.txt | 1 - traffxml/traff_assessment_tool/CMakeLists.txt | 1 - traffxml/traff_decoder.cpp | 6 ++++++ traffxml/traff_decoder.hpp | 6 ++++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/qt/CMakeLists.txt b/qt/CMakeLists.txt index e78813c1c..2e5f38b77 100644 --- a/qt/CMakeLists.txt +++ b/qt/CMakeLists.txt @@ -70,7 +70,6 @@ target_link_libraries(${PROJECT_NAME} qt_common map gflags::gflags - openlr traffxml ) diff --git a/traffxml/CMakeLists.txt b/traffxml/CMakeLists.txt index 834f73918..fe4fae5f9 100644 --- a/traffxml/CMakeLists.txt +++ b/traffxml/CMakeLists.txt @@ -17,7 +17,6 @@ omim_add_library(${PROJECT_NAME} ${SRC}) target_link_libraries(${PROJECT_NAME} pugixml - openlr coding ) diff --git a/traffxml/traff_assessment_tool/CMakeLists.txt b/traffxml/traff_assessment_tool/CMakeLists.txt index 5ff1c6cc9..9b252206f 100644 --- a/traffxml/traff_assessment_tool/CMakeLists.txt +++ b/traffxml/traff_assessment_tool/CMakeLists.txt @@ -22,7 +22,6 @@ omim_add_executable(${PROJECT_NAME} ${SRC}) set_target_properties(${PROJECT_NAME} PROPERTIES AUTOUIC ON AUTOMOC ON) target_link_libraries(${PROJECT_NAME} - openlr qt_common map gflags::gflags diff --git a/traffxml/traff_decoder.cpp b/traffxml/traff_decoder.cpp index 1cd522e85..8838d1689 100644 --- a/traffxml/traff_decoder.cpp +++ b/traffxml/traff_decoder.cpp @@ -7,9 +7,12 @@ #include "indexer/feature.hpp" +// Only needed for OpenlrTraffDecoder, see below +#if 0 #include "openlr/decoded_path.hpp" #include "openlr/openlr_decoder.hpp" #include "openlr/openlr_model.hpp" +#endif #include "routing/async_router.hpp" #include "routing/checkpoints.hpp" @@ -236,6 +239,8 @@ void TraffDecoder::DecodeMessage(traffxml::TraffMessage & message) } } +// Disabled for now, as the OpenLR-based decoder is slow, buggy and not well suited to the task. +#if 0 OpenLrV3TraffDecoder::OpenLrV3TraffDecoder(DataSource & dataSource, CountryInfoGetterFn countryInfoGetter, const CountryParentNameGetterFn & countryParentNameGetter, std::map & messageCache) @@ -451,6 +456,7 @@ void OpenLrV3TraffDecoder::DecodeLocation(traffxml::TraffMessage & message, traf decoded[paths[i].m_path[j].GetFeatureId().m_mwmId][traffic::TrafficInfo::RoadSegmentId(fid, segment, direction)] = traffic::SpeedGroup::Unknown; } } +#endif double RoutingTraffDecoder::TraffEstimator::GetUTurnPenalty(Purpose /* purpose */) const { diff --git a/traffxml/traff_decoder.hpp b/traffxml/traff_decoder.hpp index 98ed7ddf2..6189aea8b 100644 --- a/traffxml/traff_decoder.hpp +++ b/traffxml/traff_decoder.hpp @@ -5,8 +5,11 @@ #include "indexer/data_source.hpp" #include "indexer/mwm_set.hpp" +// Only needed for OpenlrTraffDecoder, see below +#if 0 #include "openlr/openlr_decoder.hpp" #include "openlr/openlr_model.hpp" +#endif #include "routing/index_router.hpp" #include "routing/regions_decl.hpp" @@ -85,6 +88,8 @@ protected: private: }; +// Disabled for now, as the OpenLR-based decoder is slow, buggy and not well suited to the task. +#if 0 /** * @brief A `TraffDecoder` implementation which internally uses the version 3 OpenLR decoder. */ @@ -170,6 +175,7 @@ private: */ openlr::OpenLRDecoder m_openLrDecoder; }; +#endif /** * @brief A `TraffDecoder` implementation which internally uses the routing engine.