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

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 @@
History
=======
0.15.11 (2020-11-02)
--------------------
* Replaced deprecated osgeo imports.
0.15.10 (2020-10-30)
--------------------
......@@ -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.
0.15.4 (2020-09-01)
-------------------
......
......@@ -26,11 +26,7 @@ __author__ = "Daniel Scheffler"
import datetime
import numpy as np
try:
from osgeo import gdal
except ImportError:
import gdal
from osgeo import gdal
# dictionary to translate Numpy data types (strings) into corresponding GDAL data types,
# e.g. dTypeDic_NumPy2GDAL(str(np.dtype(np.uint8)))
......
......@@ -25,13 +25,7 @@ import pyproj
import numpy as np
from shapely.ops import transform
from typing import Union # noqa F401 # flake8 issue
try:
from osgeo import osr
from osgeo import gdal
except ImportError:
import osr
import gdal
from osgeo import gdal, osr
__author__ = "Daniel Scheffler"
......
......@@ -30,13 +30,7 @@ from tempfile import TemporaryDirectory
from pyproj import CRS
import numpy as np
try:
from osgeo import osr
from osgeo import gdal
except ImportError:
# noinspection PyPackageRequirements
import osr
import gdal
from osgeo import gdal, osr
from .coord_trafo import transform_any_prj
from .projection import isLocal
......
......@@ -24,12 +24,7 @@
import re
from pyproj import CRS
from typing import Union # noqa F401 # flake8 issue
# custom
try:
from osgeo import osr
except ImportError:
import osr
from osgeo import osr
from ..environment import gdal_env
......
......@@ -27,15 +27,7 @@ from six import PY3
from shapely.wkb import loads
import numpy as np
try:
import gdal
import ogr
import osr
except ImportError:
from osgeo import gdal
from osgeo import ogr
from osgeo import osr
from osgeo import gdal, osr, ogr
from ...io.raster.gdal import get_GDAL_ds_inmem
from ...processing.progress_mon import ProgressBar, Timer
......
......@@ -28,12 +28,7 @@ from pkgutil import find_loader
# custom
from pyproj import CRS
try:
from osgeo import gdal
from osgeo import gdalnumeric
except ImportError:
import gdal
import gdalnumeric
from osgeo import gdal, gdalnumeric
from ...dtypes.conversion import dTypeDic_NumPy2GDAL
from ..projection import WKT2EPSG, isProjectedOrGeographic, prj_equal
......
......@@ -28,15 +28,7 @@ from shapely.geometry import shape, mapping, box
from shapely.geometry import Polygon # noqa F401 # flake8 issue
from shapely import wkt
from pyproj import CRS
try:
from osgeo import ogr
from osgeo import osr
from osgeo import gdal
except ImportError:
import ogr
import osr
import gdal
from osgeo import gdal, ogr, osr
from ..coord_trafo import imYX2mapYX, mapYX2imYX, pixelToMapYX
from ...dtypes.conversion import get_dtypeStr, dTypeDic_NumPy2GDAL
......
......@@ -28,15 +28,9 @@ import os
import numpy as np
from pandas import DataFrame
from osgeo import gdal_array
from osgeo import gdal, gdal_array
from pyproj import CRS
try:
from osgeo import gdal
except ImportError:
import gdal
from ...dtypes.conversion import dTypeDic_NumPy2GDALcompatible
......
......@@ -24,12 +24,7 @@
import multiprocessing
import ctypes
import numpy as np
try:
import gdal
except ImportError:
from osgeo import gdal
from osgeo import gdal
from ...numeric.array import get_array_tilebounds
......
......@@ -25,10 +25,7 @@ import os
import multiprocessing
from pyproj import CRS
try:
import gdal
except ImportError:
from osgeo import gdal
from osgeo import gdal
from ...dtypes.conversion import convertGdalNumpyDataType
from ...geo.map_info import geotransform2mapinfo
......
# -*- coding: utf-8 -*-
import os
import ogr
import osr
from osgeo import ogr, osr
from ...dtypes.conversion import get_dtypeStr
from ...geo.projection import EPSG2WKT
......
......@@ -19,5 +19,5 @@
# 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/>.
__version__ = '0.15.10'
__versionalias__ = '20201030_02'
__version__ = '0.15.11'
__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