[OSGeoLive] Rasterio env vars confused

Brian M Hamlin maplabs at light42.com
Tue Jul 26 21:27:01 PDT 2022

  it appears that the dot-deb packages  rasterio, python3-rasterio   are 
not working well with   proj-bin, libproj22, python3-pyproj  and Python 3.10

  Note:   $ rio info ~/data/landsat/clip10.tif   ## OK

  and   $ projinfo EPSG:32619   ##  OK


    $ ipython3 Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
    Type 'copyright', 'credits' or 'license' for more information
    IPython 7.31.1 -- An enhanced Interactive Python. Type '?' for help.
    In [1]: import rasterio as rio In [2]: rio.crs Out[2]: <module
    'rasterio.crs' from
    '/usr/lib/python3/dist-packages/rasterio/crs.py'> In [3]: res0 =
    rio.crs.CRS.from_dict(proj="aea") ERROR 1: PROJ: proj_create: Error
    1027 (Invalid value for an argument): aea: Invalid value for lat_1
    and lat_2: |lat_1 + lat_2| should be > 0
    CPLE_BaseError Traceback (most recent call last) rasterio/_crs.pyx
    in rasterio._crs._CRS.from_dict() rasterio/_err.pyx in
    rasterio._err.exc_wrap_ogrerr() CPLE_BaseError: OGR Error code 5
    During handling of the above exception, another exception occurred:
    CRSError Traceback (most recent call last)
    <ipython-input-3-adc377751468> in <module> ----> 1 res0 =
    /usr/lib/python3/dist-packages/rasterio/crs.py in from_dict(cls,
    initialdata, **kwargs) 439 """ 440 obj = cls() --> 441 obj._crs =
    _CRS.from_dict(initialdata, **kwargs) 442 return obj 443
    rasterio/_crs.pyx in rasterio._crs._CRS.from_dict() CRSError: The
    PROJ4 dict could not be understood. OGR Error code 5


credit to a debug session with Digital Earth Australia and the 
OpenDatacube project


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/osgeolive/attachments/20220726/f2f71668/attachment.htm>

More information about the osgeolive mailing list