forked from MapComplete/MapComplete
Scripts(offline): skip already existing columns
This commit is contained in:
parent
5e89c80f29
commit
f5516432e3
1 changed files with 2 additions and 1 deletions
|
@ -41,11 +41,12 @@ class GeneratePmTilesExtracts extends Script {
|
||||||
const boundary = 2 << (z - 1)
|
const boundary = 2 << (z - 1)
|
||||||
for (let x = 0; x < boundary; x++) {
|
for (let x = 0; x < boundary; x++) {
|
||||||
console.log("Checking ", this.getFilename(z, x, boundary), z, x, boundary)
|
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
|
// Skip this column, already exists
|
||||||
console.log("Skipping column ", x, "at zoom", z)
|
console.log("Skipping column ", x, "at zoom", z)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let y = 0; y < boundary; y++) {
|
for (let y = 0; y < boundary; y++) {
|
||||||
yield this.generateArchive(z, x, y, maxzoom)
|
yield this.generateArchive(z, x, y, maxzoom)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue