119 plot raster
Uncomment the following line to install geemap if needed.
In [ ]:
Copied!
# !pip install -U geemap
# !pip install -U geemap
In [ ]:
Copied!
import os
import geemap
import os
import geemap
Download a sample dataset.
In [ ]:
Copied!
url = "https://github.com/giswqs/data/raw/main/raster/srtm90.tif"
url = "https://github.com/giswqs/data/raw/main/raster/srtm90.tif"
In [ ]:
Copied!
image = "srtm90.tif"
if not os.path.exists(image):
geemap.download_file(url, image)
image = "srtm90.tif"
if not os.path.exists(image):
geemap.download_file(url, image)
Plot the raster image in 2D.
In [ ]:
Copied!
geemap.plot_raster(image, cmap="terrain", figsize=(15, 10))
geemap.plot_raster(image, cmap="terrain", figsize=(15, 10))
Plot the raster image in 3D.
In [ ]:
Copied!
geemap.plot_raster_3d("srtm90.tif", factor=2, cmap="terrain", background="gray")
geemap.plot_raster_3d("srtm90.tif", factor=2, cmap="terrain", background="gray")