Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly faster GDAL validateCOG #1761

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading