Skip to content

Commit

Permalink
Move import
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan committed Apr 27, 2022
1 parent ca5260f commit cf9658a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sources/gdal/large_image_source_gdal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cf9658a

Please sign in to comment.