TIME: 6.41345977783e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.50203704834e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.21593475342e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.31130218506e-05
(1646302.7175560538, 4859396.61741957)
TIME: 9.77516174316e-06
(1646302.7175560538, 4859396.61741957)
TIME: 1.09672546387e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.38282775879e-05
(1646302.7175560538, 4859396.61741957)
TIME: 9.05990600586e-06
(1646302.7175560538, 4859396.61741957)
TIME: 1.00135803223e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.09672546387e-05
(1646302.7175560538, 4859396.61741957)
TIME: 8.10623168945e-06
(1646302.7175560538, 4859396.61741957)
TIME: 7.86781311035e-06
(1646302.7175560538, 4859396.61741957)
TIME: 1.69277191162e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.09672546387e-05
(1646302.7175560538, 4859396.61741957)
TIME: 8.10623168945e-06
(1646302.7175560538, 4859396.61741957)
TIME: 1.4066696167e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.4066696167e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.09672546387e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.71661376953e-05
(1646302.7175560538, 4859396.61741957)
TIME: 1.69277191162e-05
(1646302.7175560538, 4859396.61741957)
+proj=geos
projection. I was thinking of defining my own EPSG code for this, but with the changes to PROJ where it uses a sqlite DB now, is it possible to do this any more?
other.extra
file (https://github.com/OSGeo/PROJ/blob/master/data/other.extra). From what I can tell they don't and I don't think they are included in the PROJ database. So are the files just there for backwards compatibility?
I'm a little bit confused about Proj initialization. I have a following code for geometry transformation:
from functools import partial
import pyproj
from pyproj import Proj
from shapely.geometry import Point
from shapely.ops import transform
if __name__ == '__main__':
p = Point(400_000, 6_000_000)
old_proj = partial(pyproj.transform, Proj(init="epsg:32649"), Proj(init="epsg:4326"))
new_proj = partial(pyproj.transform, Proj("epsg:32649"), Proj("epsg:4326"))
print(transform(old_proj, p))
print(transform(new_proj, p))
It results in:
/home/ilya/.cache/pypoetry/virtualenvs/pyprojbug-Ra-0DuD_-py3.6/lib/python3.6/site-packages/pyproj/crs.py:77: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method.
return _prepare_from_string(" ".join(pjargs))
/home/ilya/.cache/pypoetry/virtualenvs/pyprojbug-Ra-0DuD_-py3.6/lib/python3.6/site-packages/pyproj/crs.py:77: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method.
return _prepare_from_string(" ".join(pjargs))
POINT (109.4692987436448 54.13837331779994)
POINT (54.13837331779994 109.4692987436448)
Why is Proj(init="epsg:32649")
and Proj("epsg:32649")
giving different results?
always_xy
for a simple fix.
string = "+proj=pipeline +ellps=GRS80 +step +proj=cart"
pipe = Transformer.from_pipeline(string)
pipe.transform(50, 25, errcheck=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/pyproj/transformer.py", line 446, in transform
errcheck=errcheck,
File "pyproj/_transformer.pyx", line 463, in pyproj._transformer._Transformer._transform
pyproj.exceptions.ProjError: transform error: latitude or longitude exceeded limits
echo 50 25 0 | cct +proj=pipeline +ellps=GRS80 +step +proj=cart
3717892.6072 4430811.8715 2679074.4629 inf
@snowman2 Coming with another shot in the dark question: Have you had any issues pop up recently with unicode issues with pyproj or PROJ? We have a Satpy user on Windows that is having random (I think) errors with a particular PROJ dict being passed to pyproj. It errors and says either:
pyproj.exceptions.ProjError: Invalid projection b'\x02\x01roj=geos +sweep=x +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs'.: (Internal Proj Error: proj_create: unrecognized format / unknown name)
Or:
File "pyproj/_crs.pyx", line 24, in pyproj._crs.cstrdecode
File "C:\ProgramData\Miniconda3\lib\site-packages\pyproj\compat.py", line 21, in pystrdecode
return cstr.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 8-9: invalid continuation byte
I'm currently working with them to narrow this down, but it seems related to a particular type of processing with various dask workers, etc. Note the PROJ string they are using stays the same and will sometimes work. Any ideas?
Installed /home/docs/checkouts/readthedocs.org/user_builds/pyresample/envs/310/lib/python3.7/site-packages/configobj-5.0.6-py3.7.egg
Searching for pyproj>=1.9.5.1
Reading https://pypi.org/simple/pyproj/
Downloading https://files.pythonhosted.org/packages/17/e5/3f5cdff3e955bcd768cdb0f4236f2d6e022aaa72f57caf7f4d5f552c88fc/pyproj-3.0.0.post1.tar.gz#sha256=a49581629cadd29e61fc061d153a4d62ff28b4063c71fe8ca881eeb98cd22017
Best match: pyproj 3.0.0.post1
Processing pyproj-3.0.0.post1.tar.gz
Writing /tmp/easy_install-7u9_8k61/pyproj-3.0.0.post1/setup.cfg
Running pyproj-3.0.0.post1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7u9_8k61/pyproj-3.0.0.post1/egg-dist-tmp-91dxe9zi
error: Setup script exited with ERROR: Cython.Build.cythonize not found. Cython is required to build from a repo.