Fiona 1.8.21 breaks GDAL/PROJ environment in Docker/Virtualenv
See original GitHub issueHello,
Installing Fiona 1.8.21 breaks my GDAL/Proj environment in my docker image, with Python 3.7 running on Debian:buster-slim. However, rolling back to 1.8.20 with the exact same Dockerfile makes it work again.
I have several different errors like:
fiona._err.CPLE_AppDefinedError: PROJ: proj_create: no database context specified
fiona._err.CPLE_AppDefinedError: Cannot import GDLIB:32701 due to ALLOW_FILE_ACCESS=NO
PROJCS["WGS 84 / UTM zone 40N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",57],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32640"]] != epsg:4326
Did you changed the gdal_data
directory of Fiona ?
Here are the way I export my GDAL environment variables:
ENV CPLUS_INCLUDE_PATH="/usr/include/gdal"
ENV C_INCLUDE_PATH="/usr/include/gdal"
ENV PROJ_LIB="/usr/local/lib/python3.7/dist-packages/pyproj/proj_dir/share/proj"
ENV GDAL_DATA="/usr/local/lib/python3.7/dist-packages/fiona/gdal_data/"
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Can't install Fiona on Windows - Stack Overflow
Make a virtual environment in Anaconda Navigator and install GDAL into this environement through the GUI. Install shapely with pip install ...
Read more >Fiona 1.8.21 breaks GDAL/PROJ environment in ... - bytemeta
Installing Fiona 1.8.21 breaks my GDAL/Proj environment in my docker image, with Python 3.7 running on Debian:buster-slim. However, rolling back to 1.8.20 with ......
Read more >Fiona - PyPI
Fiona is GDAL's neat and nimble vector API for Python programmers. ... Note: The following environment variables needs to be set so that...
Read more >Topics - main@fiona.groups.io
When we import fiona (1.8.21) into our python code in our cloud environment, we get this output: ERROR 1: PROJ:... When we ...
Read more >Toblerity Fiona Issues - IssueHint
Toblerity Fiona: Fiona reads and writes geographic data files Check out Toblerity Fiona ... Fiona 1.8.21 breaks GDAL/PROJ environment in Docker/Virtualenv ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@remi-braun is your intention to have rasterio and fiona use the same GDAL apt package? In that case, eliminate
pip install --no-cache-dir --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL=='gdal-config --version'
and replace withpip install --no-binary fiona,rasterio fiona rasterio
. Fiona and rasterio don’t depend on the GDAL Python package. Then you can unset PROJ_LIB and GDAL_DATA.The GDAL and PROJ data files included in the fiona and rasterio wheels are intended for use with that installed package only. They can’t reliably be shared with other applications on your system.
I have the same issue with reading GML files, but not with a ESRI Shapefile with a prj file. Is this an issue that GDAL tries to read files not related directly to the sourcefile? The
28992
is the EPSG code for the Dutch Rijksdriehoek coordinate system.