__init__.py 666 Bytes
Newer Older
1
# -*- coding: utf-8 -*-
2
from __future__ import (division, print_function, absolute_import, unicode_literals)
3
from .version import __version__, __versionalias__
4

Daniel Scheffler's avatar
Daniel Scheffler committed
5
__author__ = 'Daniel Scheffler'
6
7
8
9

# Validate GDAL version
try:
    import gdal
10
    import gdalnumeric
11
except ImportError:
12
    from osgeo import gdal
13
    from osgeo import gdalnumeric
14
15

try:
Daniel Scheffler's avatar
Daniel Scheffler committed
16
17
18
    getattr(gdal, 'Warp')
    getattr(gdal, 'Translate')
    getattr(gdalnumeric, 'OpenNumPyArray')
19
20
21
22
except AttributeError:
    import warnings
    warnings.warn("Your GDAL version is too old to support all functionalities of the 'py_tools_ds' package. "
                  "Please update GDAL!")
23
del gdal, gdalnumeric