Skip to content

Commit

Permalink
Merge branch 'enhancement/fix_gdal_warning' into 'main'
Browse files Browse the repository at this point in the history
Enhancement/fix gdal warning

See merge request danschef/arosics!34
  • Loading branch information
Daniel Scheffler committed May 4, 2023
2 parents 8c49dbf + d294327 commit 9fe4905
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ History

* Re-implemented interpolation of tie point attributes into space (!23).
Three techniques are now supported: RBF, GPR, and Ordinary Kriging. Added scikit-learn to dependencies.
* Fixed GDAL warning related to PROJ_DATA/PROJ_LIB environment variables (!34).


1.8.1 (2023-03-10)
Expand Down
8 changes: 8 additions & 0 deletions arosics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import warnings as _warnings
from pkgutil import find_loader as _find_loader
import os as __os

from arosics.CoReg import COREG
from arosics.CoReg_local import COREG_LOCAL
Expand All @@ -47,3 +48,10 @@
# check optional dependencies
if not _find_loader('pyfftw'):
_warnings.warn('PYFFTW library is missing. However, coregistration works. But in some cases it can be much slower.')


# $PROJ_LIB was renamed to $PROJ_DATA in proj=9.1.1, which leads to issues with fiona>=1.8.20,<1.9
# https://github.com/conda-forge/pyproj-feedstock/issues/130
# -> fix it by setting PROJ_DATA
if 'GDAL_DATA' in __os.environ and 'PROJ_DATA' not in __os.environ and 'PROJ_LIB' not in __os.environ:
__os.environ['PROJ_DATA'] = __os.path.join(__os.path.dirname(__os.environ['GDAL_DATA']), 'proj')

0 comments on commit 9fe4905

Please sign in to comment.