Commit 0b19aa07 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed pyproj DeprecationWarning related to proj4 string. Added pyproj to...


Fixed pyproj DeprecationWarning related to proj4 string. Added pyproj to dependencies (which was already used under the hood). Bumped version.
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 01531af1
Pipeline #19438 failed with stages
in 15 minutes and 43 seconds
...@@ -13,11 +13,9 @@ test_arosics: ...@@ -13,11 +13,9 @@ test_arosics:
script: script:
- source /root/miniconda3/bin/activate ci_env - source /root/miniconda3/bin/activate ci_env
- conda install -c conda-forge cartopy # FIXME remove as soon as docker container is rebuilt
# update py_tools_ds and geoarray # update py_tools_ds and geoarray
- pip install "py_tools_ds>=0.15.10" - conda update -y -q -c conda-forge py_tools_ds
- pip install "geoarray>=0.9.0" - conda update -y -q -c conda-forge geoarray
# run tests # run tests
- make nosetests - make nosetests
......
...@@ -46,7 +46,7 @@ from geoarray import GeoArray ...@@ -46,7 +46,7 @@ from geoarray import GeoArray
from py_tools_ds.convenience.object_oriented import alias_property from py_tools_ds.convenience.object_oriented import alias_property
from py_tools_ds.geo.coord_calc import get_corner_coordinates from py_tools_ds.geo.coord_calc import get_corner_coordinates
from py_tools_ds.geo.vector.topology import get_overlap_polygon, get_smallest_boxImYX_that_contains_boxMapYX from py_tools_ds.geo.vector.topology import get_overlap_polygon, get_smallest_boxImYX_that_contains_boxMapYX
from py_tools_ds.geo.projection import prj_equal, get_proj4info from py_tools_ds.geo.projection import prj_equal
from py_tools_ds.geo.vector.geometry import boxObj, round_shapelyPoly_coords from py_tools_ds.geo.vector.geometry import boxObj, round_shapelyPoly_coords
from py_tools_ds.geo.coord_grid import move_shapelyPoly_to_image_grid, is_coord_grid_equal from py_tools_ds.geo.coord_grid import move_shapelyPoly_to_image_grid, is_coord_grid_equal
from py_tools_ds.geo.coord_trafo import reproject_shapelyGeometry, mapXY2imXY, imXY2mapXY from py_tools_ds.geo.coord_trafo import reproject_shapelyGeometry, mapXY2imXY, imXY2mapXY
...@@ -450,9 +450,15 @@ class COREG(object): ...@@ -450,9 +450,15 @@ class COREG(object):
self.shift = GeoArray_CoReg(self.params, 'shift') self.shift = GeoArray_CoReg(self.params, 'shift')
if not prj_equal(self.ref.prj, self.shift.prj): if not prj_equal(self.ref.prj, self.shift.prj):
from pyproj import CRS
def get_prjdesc(proj):
crs = CRS.from_user_input(proj)
return "%s (EPSG: %d)" % (crs.name, crs.to_epsg())
raise RuntimeError( raise RuntimeError(
'Input projections are not equal. Different projections are currently not supported. Got %s / %s.' 'Input projections are not equal. Different projections are currently not supported. '
% (get_proj4info(proj=self.ref.prj), get_proj4info(proj=self.shift.prj))) 'Got %s / %s.' % (get_prjdesc(self.ref.prj), get_prjdesc(self.shift.prj)))
def _get_overlap_properties(self): def _get_overlap_properties(self):
overlap_tmp = get_overlap_polygon(self.ref.poly, self.shift.poly, self.v) overlap_tmp = get_overlap_polygon(self.ref.poly, self.shift.poly, self.v)
......
...@@ -11,6 +11,7 @@ pandas ...@@ -11,6 +11,7 @@ pandas
plotly plotly
pyfftw pyfftw
pykrige pykrige
pyproj>2.2.0
py_tools_ds>=0.15.10 py_tools_ds>=0.15.10
scikit-image>=0.16.0 scikit-image>=0.16.0
shapely shapely
......
...@@ -51,6 +51,7 @@ req = [ ...@@ -51,6 +51,7 @@ req = [
'plotly', 'plotly',
'pyfftw', 'pyfftw',
'pykrige', 'pykrige',
'pyproj>2.2.0',
'py_tools_ds>=0.15.10', 'py_tools_ds>=0.15.10',
'scikit-image>=0.16.0', 'scikit-image>=0.16.0',
'shapely', 'shapely',
......
...@@ -18,6 +18,7 @@ dependencies: ...@@ -18,6 +18,7 @@ dependencies:
- pandas - pandas
- pyfftw - pyfftw
- pykrige - pykrige
- pyproj>2.2.0
- py-tools-ds>=0.15.10 - py-tools-ds>=0.15.10
- scikit-image>=0.16.0 - scikit-image>=0.16.0
- shapely - shapely
......
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