-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Proj4 warnings #757
Conversation
@@ -1454,7 +1454,7 @@ def __init__(self, central_longitude=0, globe=None): | |||
# 40 deg N introduced by incomplete fix to issue #113 (see | |||
# https://trac.osgeo.org/proj/ticket/113). | |||
import re | |||
match = re.search(r"\d\.\d", PROJ4_RELEASE) | |||
match = re.search(r"\d+\.\d+", PROJ4_RELEASE) | |||
if match is not None: | |||
proj4_version = float(match.group()) | |||
if 4.8 <= proj4_version < 4.9: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for switching to \d+
(although in this specific case it's unlikely to cause a problem - it won't affect the subsequent version check until we hit 4.80 or greater), but this still isn't correct because of the float conversion: float('4.80') == 4.8
.
How about factoring out the PROJ4_RELEASE
-to-tuple code and sharing it with the azimuthal equidistant code? This comparison would then become (4, 8, 0) <= proj4_version < (4, 9, 0)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point about the float
. Actually, there are a couple more cases of this in the tests that I need to fix as well.
Thanks for this @QuLogic. |
Single digit regex matches will erroneously match versions such as 4.10 as 4.1 or 14.8 as 4.8, which may trigger the Robinson projection warning even for new-and-fixed proj4 releases.
Old proj.4 has an issue with the AzimuthalEquidistant transformation past 90 degrees.
I think I've handled all the comments. |
Fix a small problem with the Robinson check that could trigger the warning on multi-digit versions in the future.
Add a warning for Azimuthal Equidistant to indicate the issue with > 90 degree transforms. Closes #568.