Planetary Computer
Tags :: STAC
Landsat Collection 2 Level 2
Collection URL :: https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l2
Providers ::
- NASA (producer, licensor)
- USGS (producer, processor, licensor)
- Microsoft (host)
License :: Public Domain
DOI ::
- Landsat 4-5 TM Collection 2 Level-2 : (10.5066/P9IAXOVV)
- Landsat 7 ETM+ Collection 2 Level-2 : (10.5066/P9C7I13B)
- Landsat 8-9 OLI/TIRS Collection 2 Level-2 : (10.5066/P9OGBGM6)
Bands
Band | Key | Central Wavelength | Bandwidth | Description |
---|---|---|---|---|
TM_B1 | blue | 0.49 μm | 0.07 μm | Visible blue (Thematic Mapper) |
TM_B2 | green | 0.56 μm | 0.08 μm | Visible green (Thematic Mapper) |
TM_B3 | red | 0.66 μm | 0.06 μm | Visible red (Thematic Mapper) |
TM_B4 | nir08 | 0.83 μm | 0.14 μm | Near infrared (Thematic Mapper) |
TM_B5 | swir16 | 1.65 μm | 0.2 μm | Short-wave infrared (Thematic Mapper) |
TM_B6 | lwir | 11.45 μm | 2.1 μm | Long-wave infrared (Thematic Mapper) |
TM_B7 | swir22 | 2.22 μm | 0.27 μm | Short-wave infrared (Thematic Mapper) |
ETM_B1 | blue | 0.48 μm | 0.07 μm | Visible blue (Enhanced Thematic Mapper Plus) |
ETM_B2 | green | 0.56 μm | 0.08 μm | Visible green (Enhanced Thematic Mapper Plus) |
ETM_B3 | red | 0.66 μm | 0.06 μm | Visible red (Enhanced Thematic Mapper Plus) |
ETM_B4 | nir08 | 0.84 μm | 0.13 μm | Near infrared (Enhanced Thematic Mapper Plus) |
ETM_B5 | swir16 | 1.65 μm | 0.2 μm | Short-wave infrared (Enhanced Thematic Mapper Plus) |
ETM_B6 | lwir | 11.34 μm | 2.05 μm | Long-wave infrared (Enhanced Thematic Mapper Plus) |
ETM_B7 | swir22 | 2.2 μm | 0.28 μm | Short-wave infrared (Enhanced Thematic Mapper Plus) |
OLI_B1 | coastal | 0.44 μm | 0.02 μm | Coastal/Aerosol (Operational Land Imager) |
OLI_B2 | blue | 0.48 μm | 0.06 μm | Visible blue (Operational Land Imager) |
OLI_B3 | green | 0.56 μm | 0.06 μm | Visible green (Operational Land Imager) |
OLI_B4 | red | 0.65 μm | 0.04 μm | Visible red (Operational Land Imager) |
OLI_B5 | nir08 | 0.87 μm | 0.03 μm | Near infrared (Operational Land Imager) |
OLI_B6 | swir16 | 1.61 μm | 0.09 μm | Short-wave infrared (Operational Land Imager) |
OLI_B7 | swir22 | 2.2 μm | 0.19 μm | Short-wave infrared (Operational Land Imager) |
TIRS_B10 | lwir11 | 10.9 μm | 0.59 μm | Long-wave infrared (Thermal Infrared Sensor) |
Item Assets
Title | STAC Key | Roles | Type | GSD | Spectral bands | Description |
---|---|---|---|---|---|---|
Surface Temperature Quality Band | qa | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Quality Assessment Band (ST_QA) Surface Temperature |
Angle Coefficients File | ang | Metadata | Text document | – | – | Collection 2 Level-1 Angle Coefficients File |
Red Band | red | Data, reflectance | GeoTIFF (COG) | – | red | |
Blue Band | blue | Data, reflectance | GeoTIFF (COG) | – | blue | |
Downwelled Radiance Band | drad | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Downwelled Radiance Band (ST_DRAD) Surface Temperature |
Emissivity Band | emis | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Emissivity Band (ST_EMIS) Surface Temperature |
Emissivity Standard Deviation Band | emsd | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Emissivity Standard Deviation Band (ST_EMSD) |
Surface Temperature Band | lwir | Data, temperature | GeoTIFF (COG) | – | lwir | Collection 2 Level-2 Thermal Infrared Band (ST_B6) Surface Temperature |
Thermal Radiance Band | trad | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Thermal Radiance Band (ST_TRAD) |
Upwelled Radiance Band | urad | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Upwelled Radiance Band (ST_URAD) |
Atmospheric Transmittance Band | atran | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Atmospheric Transmittance Band (ST_ATRAN) |
Cloud Distance Band | cdist | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Cloud Distance Band (ST_CDIST) |
Green Band | green | Data, reflectance | GeoTIFF (COG) | – | green | |
Near Infrared Band 0.8 | nir08 | Data, reflectance | GeoTIFF (COG) | – | nir08 | |
Surface Temperature Band | lwir11 | Data, temperature | GeoTIFF (COG) | 100 m | TIRS_B10 (lwir11) | Collection 2 Level-2 Thermal Infrared Band (ST_B10) |
Short-wave Infrared Band 1.6 | swir16 | Data, reflectance | GeoTIFF (COG) | – | swir16 | |
Short-wave Infrared Band 2.2 | swir22 | Data, reflectance | GeoTIFF (COG) | – | swir22 | Collection 2 Level-2 Short-wave Infrared Band 2.2 (SR_B7) |
Coastal/Aerosol Band | coastal | Data, reflectance | GeoTIFF (COG) | – | OLI_B1 (coastal) | Collection 2 Level-2 Coastal/Aerosol Band (SR_B1) |
Product Metadata File (txt) | mtl.txt | Metadata | Text document | – | – | Collection 2 Level-2 Product Metadata File (txt) |
Product Metadata File (xml) | mtl.xml | Metadata | XML | – | – | Collection 2 Level-2 Product Metadata File (xml) |
Cloud Quality Assessment Band | cloud_qa | Cloud, cloud-shadow, snow-ice, water-mask | GeoTIFF (COG) | – | – | Collection 2 Level-2 Cloud Quality Assessment Band (SR_CLOUD_QA) |
Product Metadata File (json) | mtl.json | Metadata | JSON | – | – | Collection 2 Level-2 Product Metadata File (json) |
Pixel Quality Assessment Band | qa_pixel | Cloud, cloud-shadow, snow-ice, water-mask | GeoTIFF (COG) | – | – | Collection 2 Level-1 Pixel Quality Assessment Band (QA_PIXEL) |
– | qa_radsat | Saturation | GeoTIFF (COG) | – | – | |
Aerosol Quality Assessment Band | qa_aerosol | Data-mask, water-mask | GeoTIFF (COG) | – | – | Collection 2 Level-2 Aerosol Quality Assessment Band (SR_QA_AEROSOL) |
Atmospheric Opacity Band | atmos_opacity | Data | GeoTIFF (COG) | – | – | Collection 2 Level-2 Atmospheric Opacity Band (SR_ATMOS_OPACITY) |
Get Landsat acquistion time
This shows how to get the acquistion time of Landsat observations for the AmeriFLUX tower, US-Akn + a 5000m bounding box.
Per the STAC Item specification the datetime
property is the representative searchable date+time of the asset. In the case of Landsat (and most other EO sensors) this will be the acquisition time.
# stdlib imports
import datetime
import warnings
# third party imports
import geopandas as gpd
import pandas as pd
import planetary_computer
from pystac_client import Client
warnings.simplefilter(action="ignore", category=UserWarning)
# Query bbox
bbox = (
-81.61905431253872,
33.337402921165584,
-81.51154503758427,
33.42759674839017,
)
# Construct time query
start_date = datetime.datetime(2011, 1, 1)
end_date = datetime.datetime(2022, 12, 31)
date_query = [start_date, end_date]
# Open connection to planetary computer
client = Client.open(
"https://planetarycomputer.microsoft.com/api/stac/v1",
modifier=planetary_computer.sign_inplace,
)
# Search Landsat Collection 2 level 2
items = client.search(
collections=["landsat-c2-l2"],
bbox=bbox,
datetime=date_query,
).item_collection()
# Marshal to geopandas and make sure datetime col is interpreted as such
df = gpd.GeoDataFrame.from_features(items.to_dict(), crs="epsg:4326")
df.datetime = pd.to_datetime(df.datetime, format="mixed")
print(df.datetime) # or save to csv, whatever you want
The output will look something like the following;
0 | 2022-12-24 16:00:47.476549+00:00 |
1 | 2022-12-16 16:00:50.758114+00:00 |
2 | 2022-12-08 16:00:56.864277+00:00 |
3 | 2022-11-30 16:00:48.928334+00:00 |
4 | 2022-11-22 16:00:56.746617+00:00 |
… | |
503 | 2011-02-09 15:50:21.961013+00:00 |
504 | 2011-02-01 15:53:47.790804+00:00 |
505 | 2011-01-24 15:50:19.864081+00:00 |
506 | 2011-01-16 15:53:42.331390+00:00 |
507 | 2011-01-08 15:50:19.903038+00:00 |
-
Localize
It is important to note that the time will be in UTC+0.0. If you need to localize the time, this UTC GeoJSON contains the geometry of every UTC time zone and their offsets. A “quick” spatial merge will give you the offset. E.g.
# Read in timezone data and join utz_timezone = gpd.read_file("utc_tz.geojson") df = gpd.sjoin(df, utz_timezone, how="inner") df["hr"] = df.datetime.dt.hour + df["name"].astype(int) print(df["hr"])