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:
script:
- 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
- pip install "py_tools_ds>=0.15.10"
- pip install "geoarray>=0.9.0"
- conda update -y -q -c conda-forge py_tools_ds
- conda update -y -q -c conda-forge geoarray
# run tests
- make nosetests
......
......@@ -46,7 +46,7 @@ from geoarray import GeoArray
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.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.coord_grid import move_shapelyPoly_to_image_grid, is_coord_grid_equal
from py_tools_ds.geo.coord_trafo import reproject_shapelyGeometry, mapXY2imXY, imXY2mapXY
......@@ -450,9 +450,15 @@ class COREG(object):
self.shift = GeoArray_CoReg(self.params, 'shift')
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(
'Input projections are not equal. Different projections are currently not supported. Got %s / %s.'
% (get_proj4info(proj=self.ref.prj), get_proj4info(proj=self.shift.prj)))
'Input projections are not equal. Different projections are currently not supported. '
'Got %s / %s.' % (get_prjdesc(self.ref.prj), get_prjdesc(self.shift.prj)))
def _get_overlap_properties(self):
overlap_tmp = get_overlap_polygon(self.ref.poly, self.shift.poly, self.v)
......
......@@ -51,6 +51,7 @@ req = [
'plotly',
'pyfftw',
'pykrige',
'pyproj>2.2.0',
'py_tools_ds>=0.15.10',
'scikit-image>=0.16.0',
'shapely',
......
......@@ -18,6 +18,7 @@ dependencies:
- pandas
- pyfftw
- pykrige
- pyproj>2.2.0
- py-tools-ds>=0.15.10
- scikit-image>=0.16.0
- 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