opengeos / leafmap

A Python package for interactive mapping and geospatial analysis with minimal coding in a Jupyter environment
https://leafmap.org
MIT License
3.22k stars 386 forks source link

Can't add a Geotiff raster layer to the map #19

Closed mamoev closed 3 years ago

mamoev commented 3 years ago

Environment Information

Description

After installing xarray-leaflet, I tried to add a Geotiff raster layer to the map.

Once the file is chosen, I press the apply button and the map zooms to the right coordinates, a layer is created but nothing is displayed.

I'm attaching the file I'm trying to display so you can try on your own.

file.zip

giswqs commented 3 years ago

Are you using Windows? Unfortunately, xarray_leaflet does not work properly on Windows. See https://github.com/davidbrochart/xarray_leaflet/issues/30 @davidbrochart

Alternatively, you can use Linux-based Binder.

davidbrochart commented 3 years ago

Sorry, I still haven't got the time to work on xarray-leaflet :smile:

mamoev commented 3 years ago

Thanks for the quick responses.

I will test this on Linux.

mamoev commented 3 years ago

I tested the Binder links you provided and, in a Linux environment, it works great.

However, when running an example notebook (05_load_raster) locally, it doesn't work anymore. I have two loading icons in the bottom right corner that are displayed indefinitely and no layer are created.

giswqs commented 3 years ago

@mamoev The binder env was created using this environment.yml. Can you try creating a fresh env using the same yml?

conda env create -f environment.yml
mamoev commented 3 years ago

Thanks for the help ! It works great.

robinjacobroy commented 3 years ago

I tried to load a raster image in Google Colab but, no layer is getting added. Only the map gets zoomed to the location of the raster. Same is the case in my local system. Please help..

giswqs commented 3 years ago

Xarray-leaflet does not support Colab. Try binder https://gishub.org/leafmap-pangeo Tutorial 5

radekszostak commented 2 years ago

Currently binder examples _05_loadraster.ipynb and _32_localtile.ipynb doesn't work. I'm getting error: ImportError: localtileserver is not installed. Please install it before proceeding. https://github.com/banesullivan/localtileserver

I've noticed, that tests related to these functionalities are commented out in tests/test_leafmap.py

darlainedeme commented 1 year ago

Currently binder examples _05_loadraster.ipynb and _32_localtile.ipynb doesn't work. I'm getting error: ImportError: localtileserver is not installed. Please install it before proceeding. https://github.com/banesullivan/localtileserver

I've noticed, that tests related to these functionalities are commented out in tests/test_leafmap.py

just !pip install localtileserver