diff options
author | vng <viktor.govako@gmail.com> | 2011-09-23 19:14:55 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:24:19 +0300 |
commit | 39d18547b95d7dc0bccef93400891e3b80fbf733 (patch) | |
tree | 41e8ac051a14a3140c99a5b130fcd3e616a2d115 /indexer/index.cpp | |
parent | 50130c101e07c531c6e1a0d6048b07b2808ec00b (diff) |
Different cell coding depth for wmw when indexing.
Diffstat (limited to 'indexer/index.cpp')
-rw-r--r-- | indexer/index.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indexer/index.cpp b/indexer/index.cpp index f19d7e367d..6087e8cd02 100644 --- a/indexer/index.cpp +++ b/indexer/index.cpp @@ -35,3 +35,25 @@ Index::~Index() { Cleanup(); } + +using namespace covering; + +void Index::GetCovering(m2::RectD const & rect, int mode, int cellDepth, IntervalsT & res) +{ + ASSERT ( res.empty(), () ); + + switch (mode) + { + case 0: + CoverViewportAndAppendLowerLevels(rect, cellDepth, res); + break; + + case 1: + AppendLowerLevels(GetRectIdAsIs(rect), cellDepth, res); + break; + + case 2: + res.push_back(IntervalsT::value_type(0, static_cast<int64_t>((1ULL << 63) - 1))); + break; + } +} |