Overlay a local .TIFF file in folium leaflet?

Viewed 1553

I've been using folium to overlay earth engine images in a leaflet in Python.

I'm trying to get a local .TIFF raster to also display, but I only get an empty box in the bounds where the raster should be.

import rasterio as rio
from rasterio.plot import show

img = "./PermafrostNSIDC_2002-02-01_rgb_3600x1800.TIFF"

show(rio.open(img))

This displays my image, showing that the filepath is correct

import folium

m = folium.Map(location=[67.214,153.327],zoom_start=5)

image = folium.raster_layers.ImageOverlay(
        name="Permafrost",
        image = img, 
        bounds=[[25, -180], [80, 180]],
        interactive=True,
        zindex=1,
    )

image.add_to(m) 

This just adds an empty bounds box to the map.

Is there any way to get local .TIFF raster files to display on folium map or in this kind of leaflet?

0 Answers
Related