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
3ee2314c
Commit
3ee2314c
authored
Aug 26, 2020
by
Daniel Scheffler
Browse files
Fixed prj_equal for pyproj<2.5.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
9fe3cbef
Pipeline
#11903
failed with stage
in 12 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
py_tools_ds/geo/projection.py
View file @
3ee2314c
...
...
@@ -85,10 +85,16 @@ def prj_equal(prj1, prj2):
if
prj1
is
None
and
prj2
is
None
or
prj1
==
prj2
:
return
True
else
:
crs1
=
CRS
.
from_user_input
(
prj1
)
crs2
=
CRS
.
from_user_input
(
prj2
)
from
pyproj
import
__version__
as
ver
if
ver
.
startswith
(
'2'
)
and
int
(
ver
.
split
(
'.'
)[
1
])
>=
5
:
# CRS.equals was added in pyproj 2.5 which does not exist for Python 2.7 in conda-forge channel
crs1
=
CRS
.
from_user_input
(
prj1
)
crs2
=
CRS
.
from_user_input
(
prj2
)
return
crs1
.
equals
(
crs2
)
return
crs1
.
equals
(
crs2
)
else
:
return
get_proj4info
(
proj
=
prj1
)
==
get_proj4info
(
proj
=
prj2
)
def
isProjectedOrGeographic
(
prj
):
...
...
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