Commit 9eb435f1 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Clearer error message in case of unequal input projections that have equal...


Clearer error message in case of unequal input projections that have equal names. Updated version info.
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent dfe4f762
Pipeline #22808 passed with stages
in 4 minutes and 44 seconds
......@@ -537,10 +537,15 @@ class COREG(object):
if not prj_equal(self.ref.prj, self.shift.prj):
from pyproj import CRS
crs_ref = CRS.from_user_input(self.ref.prj)
crs_shift = CRS.from_user_input(self.shift.prj)
name_ref, name_shift = \
(crs_ref.name, crs_shift.name) if not crs_ref.name == crs_shift.name else (crs_ref.srs, crs_shift.srs)
raise RuntimeError(
'Input projections are not equal. Different projections are currently not supported. '
'Got %s vs. %s.' % (CRS.from_user_input(self.ref.prj).name,
CRS.from_user_input(self.shift.prj).name))
'Got %s vs. %s.' % (name_ref, name_shift))
def _get_overlap_properties(self) -> None:
with warnings.catch_warnings():
......
......@@ -22,5 +22,5 @@
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '1.4.2'
__versionalias__ = '2021-05-08_01'
__version__ = '1.4.3'
__versionalias__ = '2021-05-08_02'
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