Uncomment the following line to install leafmap if needed.
# !pip install leafmap
import leafmap
Create an interactive map.
m = leafmap.Map()
Add Cloud Optimized GeoTIFF (COG) from Planetary Computer.
collection = "landsat-8-c2-l2"
item = "LC08_L2SP_047027_20201204_02_T1"
m.add_stac_layer(
collection=collection,
item=item,
assets="SR_B7,SR_B5,SR_B4",
name="Landsat Band-754",
)
m.add_stac_layer(
collection=collection,
item=item,
assets="SR_B5,SR_B4,SR_B3",
name="Landsat Band-543",
)
m