description
I'm using geemap to display a raster on a created map.
This lib use xarray_leaflet
to display the raster and this lib will end up using rasterio
to manipulate the .tif file.
When I launch my display :
m = geemap.Map()
m.add_raster(clip_map, colormap='terrain', layer_name='gfc')
I get the following error :
CRSError: Unable to open EPSG support file gcs.csv. Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.
This error is everywhere on SO so I tried to verify if my GDAL_DATA env variable was coorectly set :
import os
import stat
gdal_data = os.environ['GDAL_DATA']
print('is dir: ' + str(os.path.isdir(gdal_data)))
gcs_csv = os.path.join(gdal_data, 'gcs.csv')
print('is file: ' + str(os.path.isfile(gcs_csv)))
st = os.stat(gcs_csv)
print('is readable: ' + str(bool(st.st_mode & stat.S_IRGRP)))
# out
# is dir: True
#is file: False
#FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/gdal/gcs.csv'
going to the glad distrib inb the NEWS
file, I read that they removed lots of file in 3.0 including gcs.csv
. So it's no longer included in my folder.
Is there a workaround ?
setup
rasterio==1.1.5
python==3.6
geemap==0.7.9
gdal==3.0.4