Fiona: Unable to open EPSG support file gcs.csv

This issue has the same symptoms as https://github.com/mapbox/rasterio/issues/1539:

In [1]: import fiona                                                                                                                                                                                                

In [2]: ds = fiona.open('aerialway-line.shp')                                                                                                                                                                       

In [3]: ds.crs                                                                                                                                                                                                      
ERROR 4: Unable to open EPSG support file gcs.csv.  Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.
ERROR 6: No translation for an empty SRS to PROJ.4 format is known.
Out[3]: {}

In [4]: fiona.__version__                                                                                                                                                                                           
Out[4]: '1.8.0'

The open function is decorated by ensure_env_with_credentials but it seems doesn’t work.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 28 (23 by maintainers)

Commits related to this issue

Most upvoted comments

Done.

@Juanlu001 I think I may have explained the situation poorly. Setting GDAL_DATA and PROJ_LIB to point to the directory inside the installed wheel will always work. You can find these directories by using fio env --gdal-data or fio env --proj-lib. This is what I would do if I wanted to use the PyPI wheels in production. I don’t, though, I compile Fiona from source for production and take advantage of GDAL and PROJ data paths being compiled into the binaries.

But if you don’t want to set GDAL_DATA and PROJ_LIB in your production environment, you can execute code within an Env block and the directories will be found and GDAL will be configured within the block.