Skip to content

Commit ed4cd96

Browse files
WIP
1 parent 49fbcad commit ed4cd96

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

Diff for: packages/spatial-uploads-handler/src/processRasterUpload.ts

+16-11
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,24 @@ async function createPMTiles(
233233
}
234234
}
235235

236-
await logger.exec(
237-
[
238-
"gdaladdo",
236+
// Skip building overviews if already at level 0
237+
if (overviews.length > 1) {
238+
await logger.exec(
239239
[
240-
"-r",
241-
presentation === SuggestedRasterPresentation.rgb ? "cubic" : "nearest",
242-
mbtilesPath,
243-
...overviews.map((o) => o.toString()),
240+
"gdaladdo",
241+
[
242+
"-r",
243+
presentation === SuggestedRasterPresentation.rgb
244+
? "cubic"
245+
: "nearest",
246+
mbtilesPath,
247+
...overviews.map((o) => o.toString()),
248+
],
244249
],
245-
],
246-
"Problem adding overviews to mbtiles",
247-
4 / 30
248-
);
250+
"Problem adding overviews to mbtiles",
251+
4 / 30
252+
);
253+
}
249254

250255
// Convert to pmtiles
251256
const pmtilesPath = pathJoin(workingDirectory, jobId + ".pmtiles");

0 commit comments

Comments
 (0)