diff --git a/sources/gdal/large_image_source_gdal/__init__.py b/sources/gdal/large_image_source_gdal/__init__.py index 42e471f4c..c7618720d 100644 --- a/sources/gdal/large_image_source_gdal/__init__.py +++ b/sources/gdal/large_image_source_gdal/__init__.py @@ -58,10 +58,6 @@ except PackageNotFoundError: # package is not installed pass -try: - from osgeo_utils.samples.validate_cloud_optimized_geotiff import validate as gdal_validate -except ImportError: - gdal_validate = None TileInputUnits['projection'] = 'projection' TileInputUnits['proj'] = 'projection' @@ -1213,9 +1209,9 @@ def validateCOG(self, check_tiled=True, full_check=False, strict=True, warn=True Log any warnings """ - if gdal_validate is None: - raise ImportError('Please insall `osgeo_utils`') - warnings, errors, details = gdal_validate( + from osgeo_utils.samples.validate_cloud_optimized_geotiff import validate + + warnings, errors, details = validate( self._largeImagePath, check_tiled=check_tiled, full_check=full_check