[CP] [GIS] fix gis index with high resolution

This commit is contained in:
helloamateur
2024-08-21 12:57:28 +00:00
committed by ob-robot
parent f7c92208af
commit a6cb5fe594
6 changed files with 239 additions and 32 deletions

View File

@ -236,8 +236,11 @@ void printCellid(ObS2Cellids &cells) {
S2CellId tmp(it);
std::cout << "F" << tmp.face();
std::cout << "/L" << tmp.level() << "/";
for (int level = 1; level <= tmp.level(); level++) {
std::cout << tmp.child_position(level);
for (int level = 1; level <= tmp.level() && !tmp.is_leaf(); level++) {
std::cout << tmp.child_position(level);
}
if (tmp.is_leaf()) {
std::cout << tmp.id();
}
std::cout << std::endl;
}