Skip to content

Commit

Permalink
pyproj syntax has changed in v6
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Mather committed Nov 16, 2020
1 parent 0b665ab commit 9800f66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pycurious/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ def transform_coordinates(x, y, epsg_in, epsg_out):
"""
import pyproj

proj_in = pyproj.Proj("+init=EPSG:" + str(epsg_in))
proj_out = pyproj.Proj("+init=EPSG:" + str(epsg_out))
return pyproj.transform(proj_in, proj_out, x, y)
proj_in = pyproj.CRS("EPSG:" + str(epsg_in))
proj_out = pyproj.CRS("EPSG:" + str(epsg_out))
transformer = pyproj.Transformer.from_crs(proj_in, proj_out, always_xy=True)
return transformer.transform(x,y)


def convert_extent(extent_in, epsg_in, epsg_out):
Expand Down

0 comments on commit 9800f66

Please sign in to comment.