1

I have this string:

string = '+proj=lcc +a=6371200.0 +f=0.0 +pm=0.0 +x_0=5632642.22547 +y_0=4612545.65137 +lon_0=-107.0 +lat_1=50.0 +lat_2=50.0 +lat_0=50.0 +units=m +axis=enu +no_defs'

Then I do:

my_proj = pyproj.Proj(string)

It gives me this error:

RuntimeError: b'argument not numerical or out of range'

Anyone can help me?

Python 3.7 with pyproj 1.9.5.1; but also tested on pyproj 1.9.6 (same error).

  • Why are lat 0, 1 and 2 == 50? What CRS are you trying to implement? – Michael Stimson Feb 14 '19 at 0:42
  • Hum, apparently it would be the projection of the NARR dataset (in NetCDF4) – Vincent Sasseville Feb 14 '19 at 21:00
1

Since I still want to use pyproj 1.9.6 because Pyproj 2.1.3. still hiccup with the packages that depend on Qt (matplotlib, Jupyter, etc). https://github.com/pyproj4/pyproj/issues/268

I had the same issue, and came across these pages:

Basically, it seems to be an issue in version 5.0.0 of proj4. My problem was resolved by downgrading to version 4.9.3, as suggested in the post above.

conda install proj4=4.9.3

Pyroj and packages that depend on Qt now work perfectly on the same environment!

0

I recommend upgrading to pyproj 2.2.0.

More examples here: https://pyproj4.github.io/pyproj/v2.2.0rel/examples.html

>>> import pyproj
>>> pyproj.__version__
'2.2.0'
>>> pyproj.Proj( '+proj=lcc +a=6371200.0 +f=0.0 +pm=0.0 +x_0=5632642.22547 +y_0=4612545.65137 +lon_0=-107.0 +lat_1=50.0 +lat_2=50.0 +lat_0=50.0 +units=m +axis=enu +no_defs')
Proj('+proj=lcc +lat_0=50 +lon_0=-107 +lat_1=50 +lat_2=50 +x_0=5632642.22547 +y_0=4612545.65137 +R=6371200 +units=m +no_defs', preserve_units=True)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.