# !pip install leafmap import leafmap url = "https://opengeos.org/data/raster/srtm90.tif" leafmap.cog_validate(url) leafmap.cog_validate(url, verbose=True) out_cog = "cog.tif" leafmap.image_to_cog(url, out_cog) leafmap.cog_validate(out_cog) leafmap.cog_validate(out_cog, verbose=True) m = leafmap.Map() m.add_raster(out_cog, palette="terrain", layer_name="Local COG") m.add_cog_layer(url, palette="gist_earth", name="Remote COG") m