diff --git a/large_image/tilesource/geo.py b/large_image/tilesource/geo.py index 289a0a6ba..a45805f15 100644 --- a/large_image/tilesource/geo.py +++ b/large_image/tilesource/geo.py @@ -10,6 +10,7 @@ try: import pyproj has_pyproj = True + _pyproj_under_6 = int(pyproj.proj_version_str.split('.')[0]) < 6 except Exception: has_pyproj = False @@ -23,8 +24,7 @@ ProjUnitsAcrossLevel0_MaxSize = 100 InitPrefix = '' -if has_pyproj: - NeededInitPrefix = '+init=' if int(pyproj.proj_version_str.split('.')[0]) < 6 else InitPrefix +NeededInitPrefix = '+init=' if has_pyproj and _pyproj_under_6 else InitPrefix def make_vsi(url: str, **options):