20 planet imagery
Adding Planet global monthly and quarterly mosaic
Uncomment the following line to install leafmap if needed.
# !pip install leafmap
import os
import leafmap
First, you need to sign up a Planet account and get an API key. See https://developers.planet.com/quickstart/apis. Uncomment the following line to pass in your API key.
# os.environ["PLANET_API_KEY"] = "12345"
Determine the tile format based on the plotting backend being use. It can be either ipyleaflet or folium.
tile_format = "ipyleaflet"
if os.environ.get("USE_MKDOCS") is not None:
tile_format = "folium"
Generate Planet quarterly imagery URLs.
# leafmap.planet_quarterly()
Generate Planet monthly imagery URLs.
# leafmap.planet_monthly()
Generates Planet bi-annual and monthly imagery URLs.
# leafmap.planet_catalog()
Generate Planet quarterly imagery TileLayer.
quarterly_tiles = leafmap.planet_quarterly_tiles(tile_format=tile_format)
Generate Planet monthly imagery TileLayer.
monthly_tiles = leafmap.planet_monthly_tiles(tile_format=tile_format)
Print out the quarterly tile URLs.
for tile in quarterly_tiles:
print(tile)
Planet_2016q1 Planet_2016q2 Planet_2016q3 Planet_2016q4 Planet_2017q1 Planet_2017q2 Planet_2017q3 Planet_2017q4 Planet_2018q1 Planet_2018q2 Planet_2018q3 Planet_2018q4 Planet_2019q1 Planet_2019q2 Planet_2019q3 Planet_2019q4 Planet_2020q1 Planet_2020q2 Planet_2020q3 Planet_2020q4 Planet_2021q1 Planet_2021q2 Planet_2021q3 Planet_2021q4 Planet_2022q1 Planet_2022q2 Planet_2022q3 Planet_2022q4 Planet_2023q1 Planet_2023q2 Planet_2023q3 Planet_2023q4 Planet_2024q1 Planet_2024q2 Planet_2024q3
Print out the monthly tile URLs.
for tile in monthly_tiles:
print(tile)
Planet_2016_01 Planet_2016_02 Planet_2016_03 Planet_2016_04 Planet_2016_05 Planet_2016_06 Planet_2016_07 Planet_2016_08 Planet_2016_09 Planet_2016_10 Planet_2016_11 Planet_2016_12 Planet_2017_01 Planet_2017_02 Planet_2017_03 Planet_2017_04 Planet_2017_05 Planet_2017_06 Planet_2017_07 Planet_2017_08 Planet_2017_09 Planet_2017_10 Planet_2017_11 Planet_2017_12 Planet_2018_01 Planet_2018_02 Planet_2018_03 Planet_2018_04 Planet_2018_05 Planet_2018_06 Planet_2018_07 Planet_2018_08 Planet_2018_09 Planet_2018_10 Planet_2018_11 Planet_2018_12 Planet_2019_01 Planet_2019_02 Planet_2019_03 Planet_2019_04 Planet_2019_05 Planet_2019_06 Planet_2019_07 Planet_2019_08 Planet_2019_09 Planet_2019_10 Planet_2019_11 Planet_2019_12 Planet_2020_01 Planet_2020_02 Planet_2020_03 Planet_2020_04 Planet_2020_05 Planet_2020_06 Planet_2020_07 Planet_2020_08 Planet_2020_09 Planet_2020_10 Planet_2020_11 Planet_2020_12 Planet_2021_01 Planet_2021_02 Planet_2021_03 Planet_2021_04 Planet_2021_05 Planet_2021_06 Planet_2021_07 Planet_2021_08 Planet_2021_09 Planet_2021_10 Planet_2021_11 Planet_2021_12 Planet_2022_01 Planet_2022_02 Planet_2022_03 Planet_2022_04 Planet_2022_05 Planet_2022_06 Planet_2022_07 Planet_2022_08 Planet_2022_09 Planet_2022_10 Planet_2022_11 Planet_2022_12 Planet_2023_01 Planet_2023_02 Planet_2023_03 Planet_2023_04 Planet_2023_05 Planet_2023_06 Planet_2023_07 Planet_2023_08 Planet_2023_09 Planet_2023_10 Planet_2023_11 Planet_2023_12 Planet_2024_01 Planet_2024_02 Planet_2024_03 Planet_2024_04 Planet_2024_05 Planet_2024_06 Planet_2024_07 Planet_2024_08 Planet_2024_09 Planet_2024_10
Add a Planet monthly mosaic by specifying year and month.
m = leafmap.Map()
m.add_planet_by_month(year=2020, month=8)
m
Add a Planet quarterly mosaic by specifying year and quarter.
m = leafmap.Map()
m.add_planet_by_quarter(year=2019, quarter=2)
m