Scripts(offline): skip already existing columns: add log

This commit is contained in:
Pieter Vander Vennet 2025-07-31 12:07:25 +02:00
parent 7bbc2cdb02
commit 1bfe062595

View file

@ -40,13 +40,14 @@ class GeneratePmTilesExtracts extends Script {
private* generateField(z: number, maxzoom?: number): Generator<Promise<void>> { private* generateField(z: number, maxzoom?: number): Generator<Promise<void>> {
const boundary = 2 << (z - 1) const boundary = 2 << (z - 1)
for (let x = 0; x < boundary; x++) { for (let x = 0; x < boundary; x++) {
if (existsSync(this.targetDir + "/" + this.getFilename(z, x, boundary - 1))) { const lastFileForColumn = this.getFilename(z, x, boundary - 1)
if (existsSync(this.targetDir + "/" + lastFileForColumn)) {
// Skip this column, already exists // Skip this column, already exists
console.log("Skipping column ", x, "at zoom", z) console.log("Skipping column ", x, "at zoom", z)
this.skipped += boundary this.skipped += boundary
continue continue
} else { } else {
console.log("Starting column", x, "at zoom", z) console.log("Starting column", x, "at zoom", z, "as", lastFileForColumn, "does not exist")
} }
for (let y = 0; y < boundary; y++) { for (let y = 0; y < boundary; y++) {