Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
py_tools_ds
Commits
3c2435a7
Commit
3c2435a7
authored
Nov 02, 2020
by
Daniel Scheffler
Browse files
Replaced deprecated osgeo imports. Bumped version.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
cd703fbd
Pipeline
#15170
passed with stages
in 44 minutes and 38 seconds
Changes
13
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
HISTORY.rst
View file @
3c2435a7
...
@@ -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)
-------------------
-------------------
...
...
py_tools_ds/dtypes/conversion.py
View file @
3c2435a7
...
@@ -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)))
...
...
py_tools_ds/geo/coord_trafo.py
View file @
3c2435a7
...
@@ -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"
...
...
py_tools_ds/geo/map_info.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/geo/projection.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/geo/raster/conversion.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/geo/raster/reproject.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/geo/vector/conversion.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/io/raster/gdal.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/io/raster/reader.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/io/raster/writer.py
View file @
3c2435a7
...
@@ -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
...
...
py_tools_ds/io/vector/writer.py
View file @
3c2435a7
# -*- 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
...
...
py_tools_ds/version.py
View file @
3c2435a7
...
@@ -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.1
0
'
__version__
=
'0.15.1
1
'
__versionalias__
=
'20201
030
_0
2
'
__versionalias__
=
'20201
102
_0
1
'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment