You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thank you for the great package. When running pysheds 0.3.3 with pyproj 3.4.1 I get a warning:
pysheds/sview.py:971: FutureWarning: This function is deprecated. See: https://pyproj4.github.io/pyproj/stable/gotchas.html#upgrading-to-pyproj-2-from-pyproj-1
According to the documentation of pyproj.transform calling this function is deprecated since pyproj 2.6.1. To fix it one need to change pysheds/sview.py:971 and all other occurences to something like:
@mdbartos I would suggest the following refactoring:
Move all duplicated pyproj helper code (_OLD_PYPROJ and _pyproj_init) in a seperated python module (projection.py). In that file, the default projection is defined as well as a function for transformation, which is called instead of pyproj.transform and has the same interface. For old pyproj (<2.6.1), the function just calls pyproj.transform (as now) for newer pyproj the function first creates an transformer object and calls it with the provided data.
Hi,
thank you for the great package. When running pysheds 0.3.3 with pyproj 3.4.1 I get a warning:
According to the documentation of
pyproj.transform
calling this function is deprecated since pyproj 2.6.1. To fix it one need to change pysheds/sview.py:971 and all other occurences to something like:I have not tested it yet. This is also necessary for all other occurences of pyproj.transform:
pysheds/pysheds/io.py
Lines 117 to 119 in 9d96096
pysheds/pysheds/pgrid.py
Lines 292 to 294 in 3b977e8
pysheds/pysheds/sview.py
Lines 237 to 238 in 1951f63
And of course the original one:
pysheds/pysheds/sview.py
Lines 971 to 972 in 1951f63
I can submit a PR, if it helps.
Regards, Philipp
The text was updated successfully, but these errors were encountered: