Skip to content

Commit

Permalink
Merge pull request #1761 from girder/validate-cog
Browse files Browse the repository at this point in the history
Slightly faster GDAL validateCOG
  • Loading branch information
manthey authored Jan 7, 2025
2 parents 6059360 + daf96c6 commit 9f598c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Improve handling of ome-tiff files generated by bioformats ([#1750](../../pull/1750))
- Read jp2k compressed associated images in tiff files ([#1754](../../pull/1754))
- Improve writing to zarr sinks from multiple processes ([#1713](../../pull/1713))
- Slightly faster GDAL validateCOG ([#1761](../../pull/1761))

### Changes

Expand Down
4 changes: 2 additions & 2 deletions sources/gdal/large_image_source_gdal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ def getRegion(self, format=(TILE_FORMAT_IMAGE, ), **kwargs):
raise exc
return pathlib.Path(outputPath), TileOutputMimeTypes['TILED']

def validateCOG(self, check_tiled=True, full_check=False, strict=True, warn=True):
def validateCOG(self, check_tiled=True, full_check=False, strict=True, warn=True) -> bool:
"""Check if this image is a valid Cloud Optimized GeoTiff.
This will raise a :class:`large_image.exceptions.TileSourceInefficientError`
Expand All @@ -946,7 +946,7 @@ def validateCOG(self, check_tiled=True, full_check=False, strict=True, warn=True
from osgeo_utils.samples.validate_cloud_optimized_geotiff import validate

warnings, errors, _ = validate(
self._largeImagePath,
self.dataset,
check_tiled=check_tiled,
full_check=full_check,
)
Expand Down

0 comments on commit 9f598c9

Please sign in to comment.