-
Notifications
You must be signed in to change notification settings - Fork 225
Closed
Milestone
Description
I'm not sure that this is a right place for this issue but anyway the following code works fine with pyproj 1.9.6:
>>> import pyproj
>>> from functools import partial
>>> from shapely.geometry import Polygon
>>> from shapely.ops import transform
>>>
>>> project = partial(
... pyproj.transform,
... pyproj.Proj(init='epsg:4326'),
... pyproj.Proj(init='epsg:3857'))
>>>
>>> g1 = Polygon([(-180, -90), (-180, 90), (180, 90), (180, -90), (-180, -90)])
>>> g2 = transform(project, g1)
>>> print(g2)
POLYGON ((inf inf, inf inf, inf inf, inf inf, inf inf))
>>> pyproj.__version__
'1.9.6'
but fails with the recent 2.1.0:
>>> g2 = transform(project, g1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/denis/satellogic/env/lib/python3.6/site-packages/shapely/ops.py", line 234, in transform
zip(*func(*izip(*geom.exterior.coords))))
File "/home/denis/satellogic/env/lib/python3.6/site-packages/pyproj/transformer.py", line 307, in transform
return Transformer.from_proj(p1, p2).transform(x, y, z, radians)
File "/home/denis/satellogic/env/lib/python3.6/site-packages/pyproj/transformer.py", line 151, in transform
self._transformer._transform(inx, iny, inz, radians)
File "pyproj/_transformer.pyx", line 149, in pyproj._transformer._Transformer._transform
pyproj.exceptions.ProjError: proj_trans_generic error: tolerance condition error
Maybe @sgillies has some thoughts how to deal with it.
Metadata
Metadata
Assignees
Labels
No labels