New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to display a raster .tiff file on the map #125
Comments
What operating system are you using? Have your tried creating a fresh conda env to install geemap and xarray_leaflet? I just tested this notebook example, and it works fine on my Linux machine.
|
I'm working on the cloud env of my company I have very little control on it but if you think it's the problem I'll see with my colleagues to debug it. I'll tell here if we find a solution. Don't hesitate if you have any other idea until then |
Some dependencies (e.g., gdal, rasterio) of the |
Can you just give me the version of both |
Here is the complete list of packages and versions with a fresh conda install using the following commands:
|
Due to GDAL errors I find it easy to decide on the packages you need to install for windows which raise errors like GDAL, Fiona, Rasterio and Geopandas. Then I download them from https://www.lfd.uci.edu/~gohlke/pythonlibs/ . I create a python virtual environment and install them using pip. Then I Install geemap. That way you have a virtual environment ready to go that is even not conda based. |
@estaar Thanks for sharing your experience. GDAL is only needed to for this |
To keep you updated : On this environment, if me (or any other standard user) install a new package, it fallback to the Digging into the |
Can you try putting the notebook and GeoTIFFs under the same directory? For example, my notebook and datasets are all under the Downloads folder. It works fine. Have you tried your local computer? If it works on your local computer, but not on the cloud-based env, then the issue is probably caused by restrictions on the cloud env. There might be some dependency conflict within the env. |
As you suggested I've put both the geoTiff (there are the same as yours as i'm only launching the 25th tutorial), unfortunately it didn't change the output. My question is : do you also create in your tmp repository a |
Yes, I can open the .png images from the tmp folder. Have your tried out the xarray_leaflet package directly without using geemap? See the examples. The geemap load raster function depends on |
thank you. The xarray_leaflet examples raise an exception which will help me to narrow down the problem |
Ok so after some digging into the rasterio functioning it appears that is not so compatible with gdal python binding :
which means that every time I want to use xarray_leaflet (based on rasterio) I need to start with
and there It works So now everything is in my supervisor hands to make it work on our server Thank you for your help |
@12rambau Thank you very much for taking the time to debug this issue and sharing the fix. I probably would not be able to figure this out myself. I will see if I can improve the function to make it more robust. Thanks! |
setup
rasterio==1.1.5
python==3.6
geemap==0.7.9
gdal==3.0.4
description
I'm using geemap to display a raster on a created map.
It uses
xarray_leaflet
to display the raster and this lib will end up usingrasterio
to manipulate the .tif file.When I launch my display :
I get the following error :
This error is everywhere on SO so I tried to verify if my GDAL_DATA env variable was coorectly set :
going to the glad distrib inb the
NEWS
file, I read that they removed lots of file in 3.0 includinggcs.csv
. So it's no longer included in my folder.It's the first time I'm having a compatibility problem between
rasterio
andgdal
so I'm very surprised.Having the feeling to be dum I try to reproduce your example. It raised the same error (I also verified the files that display perfectly in Qgis).
Is this function still working ? Did you see anything wrong in the way I'm using it ?
The text was updated successfully, but these errors were encountered: