File tree 1 file changed +16
-11
lines changed
packages/spatial-uploads-handler/src
1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -233,19 +233,24 @@ async function createPMTiles(
233
233
}
234
234
}
235
235
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 (
239
239
[
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
+ ] ,
244
249
] ,
245
- ] ,
246
- "Problem adding overviews to mbtiles" ,
247
- 4 / 30
248
- ) ;
250
+ "Problem adding overviews to mbtiles" ,
251
+ 4 / 30
252
+ ) ;
253
+ }
249
254
250
255
// Convert to pmtiles
251
256
const pmtilesPath = pathJoin ( workingDirectory , jobId + ".pmtiles" ) ;
You can’t perform that action at this time.
0 commit comments