From ec8e4526315c7672a005a2faf9f1ab9267464c11 Mon Sep 17 00:00:00 2001 From: Konstantin Pastbin Date: Thu, 28 Dec 2023 09:21:08 +0200 Subject: [PATCH] [generator] Store refs for pistes Signed-off-by: Konstantin Pastbin --- generator/feature_builder.cpp | 5 +++-- indexer/ftypes_matcher.cpp | 5 +++++ indexer/ftypes_matcher.hpp | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/generator/feature_builder.cpp b/generator/feature_builder.cpp index 878a82bd92..1b8eecf1bf 100644 --- a/generator/feature_builder.cpp +++ b/generator/feature_builder.cpp @@ -238,8 +238,9 @@ bool FeatureBuilder::PreSerialize() case GeomType::Line: { - // Ref is used for road's number or house number's range. - if (!routing::IsRoad(GetTypes()) && !ftypes::IsAddressInterpolChecker::Instance()(GetTypes())) + // Refs are used for road and piste numbers and house number ranges. + if (!routing::IsRoad(GetTypes()) && !ftypes::IsAddressInterpolChecker::Instance()(GetTypes()) && + !ftypes::IsPisteChecker::Instance()(GetTypes())) m_params.ref.clear(); m_params.rank = 0; diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp index 27e5fea5b3..8c0f8223af 100644 --- a/indexer/ftypes_matcher.cpp +++ b/indexer/ftypes_matcher.cpp @@ -448,6 +448,11 @@ IsIsolineChecker::IsIsolineChecker() : BaseChecker(1 /* level */) m_types.push_back(classif().GetTypeByPath({"isoline"})); } +IsPisteChecker::IsPisteChecker() : BaseChecker(1 /* level */) +{ + m_types.push_back(classif().GetTypeByPath({"piste:type"})); +} + IsPoiChecker::IsPoiChecker() : BaseChecker(1 /* level */) { string_view const poiTypes[] = { diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp index 7832f02bac..086d8a0dd6 100644 --- a/indexer/ftypes_matcher.hpp +++ b/indexer/ftypes_matcher.hpp @@ -305,6 +305,13 @@ public: DECLARE_CHECKER_INSTANCE(IsIsolineChecker); }; +class IsPisteChecker : public BaseChecker +{ + IsPisteChecker(); +public: + DECLARE_CHECKER_INSTANCE(IsPisteChecker); +}; + class IsPoiChecker : public BaseChecker { IsPoiChecker();