...
 
Commits (2)
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'