diff options
author | tatiana-yan <tatiana.kondakova@gmail.com> | 2018-12-20 13:40:53 +0300 |
---|---|---|
committer | mpimenov <mpimenov@users.noreply.github.com> | 2018-12-28 15:24:56 +0300 |
commit | 986dd8d6a85012e84933e5735ddce9194e3821f1 (patch) | |
tree | ad99fddd941d2ee5fcf5d54af9a05b8b6439e6af /platform | |
parent | 8fe258101a7847df06623106d5359265ce18d9cc (diff) |
[search][generator] Store corresponding street feature id as street identifier in HouseToStreetTable.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/mwm_traits.cpp | 10 | ||||
-rw-r--r-- | platform/mwm_traits.hpp | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/platform/mwm_traits.cpp b/platform/mwm_traits.cpp index 9d982e30fb..80fe41ff02 100644 --- a/platform/mwm_traits.cpp +++ b/platform/mwm_traits.cpp @@ -18,7 +18,13 @@ MwmTraits::HouseToStreetTableFormat MwmTraits::GetHouseToStreetTableFormat() con { if (GetFormat() < version::Format::v7) return HouseToStreetTableFormat::Unknown; - return HouseToStreetTableFormat::Fixed3BitsDDVector; + + // todo: (@t.yan) adjust after production maps generation. + uint32_t constexpr kLastVersionWithFixed3BitsDDVector = 181219; + if (GetVersion() <= kLastVersionWithFixed3BitsDDVector) + return HouseToStreetTableFormat::Fixed3BitsDDVector; + + return HouseToStreetTableFormat::EliasFanoMap; } bool MwmTraits::HasOffsetsTable() const { return GetFormat() >= version::Format::v6; } @@ -55,6 +61,8 @@ string DebugPrint(MwmTraits::HouseToStreetTableFormat format) { case MwmTraits::HouseToStreetTableFormat::Fixed3BitsDDVector: return "Fixed3BitsDDVector"; + case MwmTraits::HouseToStreetTableFormat::EliasFanoMap: + return "EliasFanoMap"; case MwmTraits::HouseToStreetTableFormat::Unknown: return "Unknown"; } diff --git a/platform/mwm_traits.hpp b/platform/mwm_traits.hpp index 65f0a4295f..9d2efaf9e4 100644 --- a/platform/mwm_traits.hpp +++ b/platform/mwm_traits.hpp @@ -34,6 +34,9 @@ public: // details. Fixed3BitsDDVector, + // Elias-Fano based map from feature id to corresponding street feature id. + EliasFanoMap, + // The format of relation is unknown. Most likely, an error has occured. Unknown }; |