Commit 1d85a8d4 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Replaced deprecated osgeo imports.


Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 24fd7e88
Pipeline #28836 failed with stages
in 0 seconds
......@@ -29,8 +29,8 @@ import os
import re
import warnings
import gdal
import gdalnumeric
from osgeo import gdal
from osgeo import gdalnumeric
import numpy as np
from natsort import natsorted
......
......@@ -44,15 +44,10 @@ import numpy as np
from matplotlib import dates as mdates
# custom
try:
from osgeo import osr
from osgeo import gdal
from osgeo import gdalnumeric
except ImportError:
import osr
import gdal
import gdalnumeric
from gdalconst import GA_ReadOnly
from osgeo import osr
from osgeo import gdal
from osgeo import gdalnumeric
from osgeo.gdal import GA_ReadOnly
import pyproj
from pyorbital import astronomy
......
......@@ -41,16 +41,10 @@ from osgeo import gdal_array
from spectral.io import envi
from spectral.io.envi import check_compatibility, check_new_filename, write_envi_header, _write_header_param
try:
from osgeo import ogr
from osgeo import osr
from osgeo import gdal
from osgeo import gdalnumeric
except ImportError:
import ogr
import osr
import gdal
import gdalnumeric
from osgeo import ogr
from osgeo import osr
from osgeo import gdal
from osgeo import gdalnumeric
import builtins
from itertools import chain
......
......@@ -28,10 +28,7 @@ import os
import sys
import warnings
try:
from osgeo import gdal
except ImportError:
import gdal
from osgeo import gdal
from logging import getLogger
from ecmwfapi.api import APIKeyFetchError, get_apikey_values
......
......@@ -44,10 +44,7 @@ import psycopg2
import shapely
from shapely.geometry import Polygon
try:
from osgeo import ogr
except ImportError:
import ogr
from osgeo import ogr
from multiprocessing import sharedctypes
from matplotlib import pyplot as plt
from subprocess import Popen, PIPE
......
......@@ -48,10 +48,7 @@ from spectral.io import envi
from pandas import DataFrame, read_csv
from nested_dict import nested_dict
try:
from osgeo import gdalnumeric
except ImportError:
import gdalnumeric
from osgeo import gdalnumeric
from geoarray import GeoArray, NoDataMask, CloudMask
from py_tools_ds.geo.coord_grid import is_coord_grid_equal
......
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