Kernel: Python 3
Uncomment the following line to install geemap if needed.
In [ ]:
In [ ]:
Download a sample raster dataset.
In [ ]:
In [ ]:
Create an interactive map.
In [ ]:
Define a mask to extract the image. The mask can be a string representing a file path to a vector dataset (e.g., geojson, shp), or a list of coordinates (e.g., [[lon,lat], [lon,lat]]), or a dictionary representing a feature (e.g., m.user_roi).
For example, the mask can be a filepath to a vector dataset.
In [ ]:
Or you can draw a polygon on the map, then use m.user_roi as the mask.
In [ ]:
Or specify a list of coordinates [lon, lat] as the mask.
In [ ]:
Specify the output filename.
In [ ]:
Clip image by mask.
In [ ]:
Add the clipped image to the map.
In [ ]: