Commit 59ef0c4a authored by Daniel Scheffler's avatar Daniel Scheffler

Merge branch 'enhancement/fix_deprecationwarning' into 'master'

* Fixed pyproj deprecation warning. Generated HISTORY.rst.

See merge request !18
parents 98e4899a 566d79d2
Pipeline #8937 failed with stages
in 1 minute and 7 seconds
This diff is collapsed.
......@@ -100,9 +100,15 @@ def transform_any_prj(prj_src, prj_tgt, x, y):
:param y:
:return:
"""
prj_src = pyproj.Proj(get_proj4info(proj=prj_src))
prj_tgt = pyproj.Proj(get_proj4info(proj=prj_tgt))
x, y = pyproj.transform(prj_src, prj_tgt, x, y)
from pyproj import __version__ as ver
if ver.startswith('2') and int(ver.split('.')[1]) >= 1:
transformer = pyproj.Transformer.from_crs(get_proj4info(proj=prj_src),
get_proj4info(proj=prj_tgt))
x, y = transformer.transform(x, y)
else:
prj_src = pyproj.Proj(get_proj4info(proj=prj_src))
prj_tgt = pyproj.Proj(get_proj4info(proj=prj_tgt))
x, y = pyproj.transform(prj_src, prj_tgt, x, y)
return x, y
......
......@@ -19,5 +19,5 @@
# You should have received a copy of the GNU Lesser General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '0.14.27'
__versionalias__ = '20200324_01'
__version__ = '0.14.28'
__versionalias__ = '20200519_01'
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