Commit 3c2435a7 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Replaced deprecated osgeo imports. Bumped version.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent cd703fbd
Pipeline #15170 passed with stages
in 44 minutes and 38 seconds
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
History History
======= =======
0.15.11 (2020-11-02)
--------------------
* Replaced deprecated osgeo imports.
0.15.10 (2020-10-30) 0.15.10 (2020-10-30)
-------------------- --------------------
...@@ -45,6 +51,7 @@ History ...@@ -45,6 +51,7 @@ History
* Added some comments to build_testsuite_image.sh and set concurrency to 4. Updated deprecated code in .gitlab_ci.yml. * Added some comments to build_testsuite_image.sh and set concurrency to 4. Updated deprecated code in .gitlab_ci.yml.
0.15.4 (2020-09-01) 0.15.4 (2020-09-01)
------------------- -------------------
......
...@@ -26,11 +26,7 @@ __author__ = "Daniel Scheffler" ...@@ -26,11 +26,7 @@ __author__ = "Daniel Scheffler"
import datetime import datetime
import numpy as np import numpy as np
from osgeo import gdal
try:
from osgeo import gdal
except ImportError:
import gdal
# dictionary to translate Numpy data types (strings) into corresponding GDAL data types, # dictionary to translate Numpy data types (strings) into corresponding GDAL data types,
# e.g. dTypeDic_NumPy2GDAL(str(np.dtype(np.uint8))) # e.g. dTypeDic_NumPy2GDAL(str(np.dtype(np.uint8)))
......
...@@ -25,13 +25,7 @@ import pyproj ...@@ -25,13 +25,7 @@ import pyproj
import numpy as np import numpy as np
from shapely.ops import transform from shapely.ops import transform
from typing import Union # noqa F401 # flake8 issue from typing import Union # noqa F401 # flake8 issue
from osgeo import gdal, osr
try:
from osgeo import osr
from osgeo import gdal
except ImportError:
import osr
import gdal
__author__ = "Daniel Scheffler" __author__ = "Daniel Scheffler"
......
...@@ -30,13 +30,7 @@ from tempfile import TemporaryDirectory ...@@ -30,13 +30,7 @@ from tempfile import TemporaryDirectory
from pyproj import CRS from pyproj import CRS
import numpy as np import numpy as np
try: from osgeo import gdal, osr
from osgeo import osr
from osgeo import gdal
except ImportError:
# noinspection PyPackageRequirements
import osr
import gdal
from .coord_trafo import transform_any_prj from .coord_trafo import transform_any_prj
from .projection import isLocal from .projection import isLocal
......
...@@ -24,12 +24,7 @@ ...@@ -24,12 +24,7 @@
import re import re
from pyproj import CRS from pyproj import CRS
from typing import Union # noqa F401 # flake8 issue from typing import Union # noqa F401 # flake8 issue
from osgeo import osr
# custom
try:
from osgeo import osr
except ImportError:
import osr
from ..environment import gdal_env from ..environment import gdal_env
......
...@@ -27,15 +27,7 @@ from six import PY3 ...@@ -27,15 +27,7 @@ from six import PY3
from shapely.wkb import loads from shapely.wkb import loads
import numpy as np import numpy as np
from osgeo import gdal, osr, ogr
try:
import gdal
import ogr
import osr
except ImportError:
from osgeo import gdal
from osgeo import ogr
from osgeo import osr
from ...io.raster.gdal import get_GDAL_ds_inmem from ...io.raster.gdal import get_GDAL_ds_inmem
from ...processing.progress_mon import ProgressBar, Timer from ...processing.progress_mon import ProgressBar, Timer
......
...@@ -28,12 +28,7 @@ from pkgutil import find_loader ...@@ -28,12 +28,7 @@ from pkgutil import find_loader
# custom # custom
from pyproj import CRS from pyproj import CRS
try: from osgeo import gdal, gdalnumeric
from osgeo import gdal
from osgeo import gdalnumeric
except ImportError:
import gdal
import gdalnumeric
from ...dtypes.conversion import dTypeDic_NumPy2GDAL from ...dtypes.conversion import dTypeDic_NumPy2GDAL
from ..projection import WKT2EPSG, isProjectedOrGeographic, prj_equal from ..projection import WKT2EPSG, isProjectedOrGeographic, prj_equal
......
...@@ -28,15 +28,7 @@ from shapely.geometry import shape, mapping, box ...@@ -28,15 +28,7 @@ from shapely.geometry import shape, mapping, box
from shapely.geometry import Polygon # noqa F401 # flake8 issue from shapely.geometry import Polygon # noqa F401 # flake8 issue
from shapely import wkt from shapely import wkt
from pyproj import CRS from pyproj import CRS
from osgeo import gdal, ogr, osr
try:
from osgeo import ogr
from osgeo import osr
from osgeo import gdal
except ImportError:
import ogr
import osr
import gdal
from ..coord_trafo import imYX2mapYX, mapYX2imYX, pixelToMapYX from ..coord_trafo import imYX2mapYX, mapYX2imYX, pixelToMapYX
from ...dtypes.conversion import get_dtypeStr, dTypeDic_NumPy2GDAL from ...dtypes.conversion import get_dtypeStr, dTypeDic_NumPy2GDAL
......
...@@ -28,15 +28,9 @@ import os ...@@ -28,15 +28,9 @@ import os
import numpy as np import numpy as np
from pandas import DataFrame from pandas import DataFrame
from osgeo import gdal_array from osgeo import gdal, gdal_array
from pyproj import CRS from pyproj import CRS
try:
from osgeo import gdal
except ImportError:
import gdal
from ...dtypes.conversion import dTypeDic_NumPy2GDALcompatible from ...dtypes.conversion import dTypeDic_NumPy2GDALcompatible
......
...@@ -24,12 +24,7 @@ ...@@ -24,12 +24,7 @@
import multiprocessing import multiprocessing
import ctypes import ctypes
import numpy as np import numpy as np
from osgeo import gdal
try:
import gdal
except ImportError:
from osgeo import gdal
from ...numeric.array import get_array_tilebounds from ...numeric.array import get_array_tilebounds
......
...@@ -25,10 +25,7 @@ import os ...@@ -25,10 +25,7 @@ import os
import multiprocessing import multiprocessing
from pyproj import CRS from pyproj import CRS
try: from osgeo import gdal
import gdal
except ImportError:
from osgeo import gdal
from ...dtypes.conversion import convertGdalNumpyDataType from ...dtypes.conversion import convertGdalNumpyDataType
from ...geo.map_info import geotransform2mapinfo from ...geo.map_info import geotransform2mapinfo
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import os import os
import ogr from osgeo import ogr, osr
import osr
from ...dtypes.conversion import get_dtypeStr from ...dtypes.conversion import get_dtypeStr
from ...geo.projection import EPSG2WKT from ...geo.projection import EPSG2WKT
......
...@@ -19,5 +19,5 @@ ...@@ -19,5 +19,5 @@
# You should have received a copy of the GNU Lesser General Public License along # You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>. # with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '0.15.10' __version__ = '0.15.11'
__versionalias__ = '20201030_02' __versionalias__ = '20201102_01'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment