From 8e573fb70e2c9710e2b7ed607d75f58584b0c9e5 Mon Sep 17 00:00:00 2001 From: Erica Fischer Date: Fri, 18 Aug 2023 11:19:58 -0700 Subject: [PATCH] OK, it did something now --- tile-join.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tile-join.cpp b/tile-join.cpp index 80fa0fd52..9f11137e4 100644 --- a/tile-join.cpp +++ b/tile-join.cpp @@ -544,11 +544,11 @@ std::string retrieve_overzoom(struct reader *r, zxy tile) { sqlite3_bind_int(stmt, 1, parent_tile.z); sqlite3_bind_int(stmt, 2, parent_tile.x); - sqlite3_bind_int(stmt, 3, parent_tile.y); + sqlite3_bind_int(stmt, 3, (1LL << parent_tile.z) - 1 - parent_tile.y); if (sqlite3_step(stmt) == SQLITE_ROW) { - const char *data = (const char *) sqlite3_column_blob(r->stmt, 3); - size_t len = sqlite3_column_bytes(r->stmt, 3); + const char *data = (const char *) sqlite3_column_blob(r->stmt, 1); + size_t len = sqlite3_column_bytes(r->stmt, 1); source = std::string(data, len); } @@ -598,7 +598,7 @@ void *join_worker(void *v) { // it is a candidate for overzooming this tile from whatever // zoom level it did produce last. - printf("overzooming %lld/%lld/%lld from zoom %d\n", ai->first.z, ai->first.x, ai->first.y, r->maxzoom_so_far); + printf("overzooming %lld/%lld/%lld from zoom %d in %s\n", ai->first.z, ai->first.x, ai->first.y, r->maxzoom_so_far, r->name.c_str()); std::string overzoomed = retrieve_overzoom(r, ai->first); if (overzoomed.size() != 0) { ai->second.push_back(overzoomed);