Scripts(offline): skip already existing columns

This commit is contained in:
Pieter Vander Vennet 2025-07-31 12:01:23 +02:00
parent 5e89c80f29
commit f5516432e3

View file

@ -41,11 +41,12 @@ class GeneratePmTilesExtracts extends Script {
const boundary = 2 << (z - 1)
for (let x = 0; x < boundary; x++) {
console.log("Checking ", this.getFilename(z, x, boundary), z, x, boundary)
if (existsSync(this.getFilename(z, x, boundary))) {
if (existsSync(this.getFilename(z, x, boundary - 1))) {
// Skip this column, already exists
console.log("Skipping column ", x, "at zoom", z)
continue
}
for (let y = 0; y < boundary; y++) {
yield this.generateArchive(z, x, y, maxzoom)
}