Skip to content

Commit

Permalink
fix(cli): disable reading sidecar files
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Jan 11, 2022
1 parent b935f87 commit 00ed06c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cli/src/cog/__test__/cog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ o.spec('cog', () => {
'QUALITY=90',
'-co',
'SPARSE_OK=YES',
'--config',
'GDAL_DISABLE_READDIR_ON_OPEN',
'EMPTY_DIR',
'-tr',
'0.75',
'0.75',
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/gdal/gdal.cog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ export class GdalCogBuilder {
// most of the imagery contains a lot of empty tiles, no need to output them
'-co',
`SPARSE_OK=YES`,
// Do not attempt to read sidecar files
'--config',
`GDAL_DISABLE_READDIR_ON_OPEN`,
`EMPTY_DIR`,
// Force a target resolution to be better than the imagery not worse
'-tr',
tr,
Expand Down

0 comments on commit 00ed06c

Please sign in to comment.