STAC APIs & Cloud Optimized GeoTIFF (COG) Streaming Workflows
How SpatioTemporal Asset Catalog (STAC) search endpoints and internally tiled COGs eliminate multi-gigabyte scene downloads in modern geospatial pipelines.
Why Cloud-Native Replaced Bulk Scene Downloads
Historically, analyzing a 5-square-kilometer farm or reservoir required downloading an entire 1-gigabyte compressed ZIP archive per date, extracting 13 separate raster files locally, and discarding 99 percent of the pixels outside your Area of Interest (AOI). Scaling that pattern across 10 years of Landsat 8/9 and Sentinel-2 imagery quickly overwhelms local storage and network bandwidth before a single index is calculated.
Cloud-native geospatial architectures eliminate bulk downloads by pairing two open standards: SpatioTemporal Asset Catalog (STAC) for structured search and Cloud Optimized GeoTIFF (COG) for partial pixel streaming. Instead of fetching whole scenes, applications ask a STAC API for matching items by geometry, date range, and cloud threshold, then read only the compressed internal raster tiles intersecting the AOI directly from object storage.
- STAC standardizes JSON metadata for satellite footprints, acquisition timestamps, bands, and asset URLs.
- COG structures a GeoTIFF with internal 256×256 or 512×512 pixel tiles and downsampled pyramid overviews.
- HTTP `Range` requests fetch only the header and specific byte offsets covering your polygon.
- Cloud-native reads cut data transfer volume by 90–99% for parcel, corridor, and municipal analyses.
STAC Data Model: Catalogs, Collections, Items, and Search
The STAC specification organizes imagery into four clean building blocks. A Catalog or Collection defines dataset-level properties such as sensor family, license, temporal extent, and band summaries (for instance, `landsat-c2-l2` or `sentinel-2-l2a`). Each satellite acquisition scene becomes a STAC Item—a valid GeoJSON Feature containing footprint geometry, UTC datetime, cloud-cover properties (`eo:cloud_cover`), and an `assets` dictionary pointing directly to COG band URLs.
A STAC API exposes a `/search` REST endpoint accepting POST payloads with `intersects` GeoJSON polygons, ISO-8601 `datetime` intervals, and `query` filters such as `eo:cloud_cover < 15`. Because STAC adopts GeoJSON natively, search results pipe effortlessly into Python (`pystac-client`), JavaScript web maps, Snowflake tables, and QGIS plugins without proprietary vendor wrappers.
- Query `collections`, `intersects`, `datetime`, and `query` parameters in one stateless POST request.
- Use common `eo` and `proj` STAC extensions to inspect cloud cover, EPSG codes, and pixel transforms.
- Paginate large search responses cleanly using STAC `next` link tokens rather than giant payloads.
- Inspect `assets` keys (`red`, `nir08`, `qa_pixel`) to resolve band roles consistently across sensors.
How COG Internal Tiling and Overviews Accelerate Streaming
Standard striped GeoTIFFs store scanlines sequentially across the full width of an 11,000-pixel scene, forcing clients to read large horizontal strips even for a small bounding box. A Cloud Optimized GeoTIFF reorganizes image bytes in two critical ways: first, it moves Image File Directory (IFD) byte-offset metadata to the very front of the file so clients discover layout in one small header read; second, it stores imagery in square internal tiles plus reduced-resolution overviews (2x, 4x, 8x, 16x).
When a web dashboard zooms out to view an entire watershed, it streams only the low-resolution 16x overview tiles via HTTP range requests; when a Python script crops a 500-hectare field at full 10-meter resolution, it pulls just the 4 or 9 internal tiles intersecting that polygon. Keeping GDAL environment flags tuned (`GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR`, `CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif`) prevents wasted directory-listing requests over S3 or HTTPS.
- Header-first IFD placement lets GDAL/rasterio locate exact tile byte ranges in 1–2 round trips.
- Internal 512×512 tiles minimize wasted bytes when reading small polygons or sliding ML windows.
- Pre-built pyramids power instant map pan/zoom previews without dedicated tile servers.
- Tune GDAL VSI curl flags to suppress unnecessary sidecar `.aux.xml` and directory HTTP probes.
Rate Limits, Caching, and Webhook-Driven Automation
Production Earth intelligence applications shouldn't poll STAC search endpoints every minute across hundreds of AOIs. Instead, platforms expose webhook subscriptions or event notifications triggered when newly downlinked scenes intersect registered polygons and pass cloud-cover gates. Upon notification, worker jobs open the signed COG URLs concurrently, compute field-level statistics, and persist compact time-series tables.
For high-throughput workloads, caching STAC Item JSON metadata locally for immutable historical dates avoids redundant API round trips, while respecting `429 Retry-After` headers and connection pooling keeps REST clients within platform latency SLAs. Storing derived zonal statistics or cropped chips in GeoParquet or S3 buckets decouples downstream BI dashboards from repeated raw raster reads.
- Cache immutable historical STAC metadata responses locally to lower median API latency.
- Use async worker pools with exponential backoff on HTTP 429 or transient 503 storage responses.
- Stream COG windows directly into memory (`rasterio.mask`) instead of writing temporary scene files.
- Validate COG compliance with `rio cogeo validate` before publishing custom derived basemaps.
Legacy Scene Download vs Cloud-Native STAC + COG Streaming
| Workflow Dimension | Legacy ZIP Scene Download | STAC API + COG Streaming | Engineering Benefit |
|---|---|---|---|
| Catalog Discovery | Proprietary web portals or SOAP APIs | Standardized REST/GeoJSON STAC `/search` | Cross-provider interoperability with open SDKs |
| Transfer Volume (10 km² AOI) | ~800–1,100 MB per scene | ~2–12 MB via HTTP Range reads | >95% bandwidth and egress reduction |
| Local Disk Footprint | High (extraction + temp files) | Near zero (in-memory window reads) | Serverless and container-friendly execution |
| Zoomed-Out Preview | Must download full-res raster first | Streams 8x/16x internal overview tiles | Sub-second interactive map rendering |
| Automation Readiness | Fragile screen scraping or batch scripts | Webhooks + pystac/rasterio pipelines | Event-driven monitoring at planetary scale |
Bandwidth savings scale inversely with AOI-to-scene area ratio; continental mosaics still benefit from parallel tile reads.
Worked Illustration: Calculating Byte Transfer Savings with COG Range Reads
This worked illustration estimates network transfer savings when reading a 2 km × 2 km (400 ha) farm polygon from a single 10-meter Sentinel-2 COG band instead of downloading the full tile.
- Illustration inputs: A full 10 m Sentinel-2 tile spans 10,980 × 10,980 pixels (120.56 million pixels) stored as a 512×512 tiled uint16 COG (~140 MB compressed for one band, ~1.2 MB average per internal tile).
- Calculate pixel footprint of the 2 km × 2 km AOI at 10 m resolution: 200 × 200 pixels = 40,000 pixels (0.033% of the tile).
- Determine intersecting 512×512 internal tiles: In the worst-case boundary split, a 200×200 window spans at most 2 × 2 = 4 internal tiles plus ~64 KB COG header.
- Estimate total bytes fetched via HTTP Range requests: (4 × 1.2 MB) + 0.064 MB = 4.86 MB across all 4 tiles versus 140 MB for the full band—a 96.5% transfer reduction (and >99% across a 4-band ZIP).
Worked Illustration Outcome: COG range streaming fetches ~4.86 MB for the 400-hectare AOI instead of 140 MB per band, cutting network payload by 96.5% and eliminating local unzip overhead.
STAC & COG Pipeline Implementation Checklist
- Filter STAC `/search` calls with exact GeoJSON `intersects`, ISO `datetime`, and `eo:cloud_cover` bounds.
- Inspect `proj:epsg` and `proj:transform` metadata before stacking COGs from multiple UTM zones.
- Configure GDAL/rasterio VSI curl environment flags to disable sidecar directory probing.
- Read the QA/SCL band window first and skip downloading reflective band windows if the AOI is cloudy.
- Verify internal tiling (512×512) and overview pyramids when generating custom COG derivatives.
- Implement exponential backoff on HTTP 429/503 responses and cache immutable STAC item lookups.
Frequently Asked Questions
Is a Cloud Optimized GeoTIFF still compatible with traditional desktop GIS software?
Yes. Every COG is a 100% valid standard GeoTIFF file. Older GIS tools can open it normally, while modern QGIS, ArcGIS, GDAL, and rasterio leverage its internal tiles and overviews for fast HTTP streaming.
What is the difference between STAC and OGC WMS/WMTS?
OGC WMS/WMTS serves pre-rendered map images for display, whereas STAC is a metadata catalog API that links directly to raw analytical data files (such as 16-bit COGs) and supports rich spatiotemporal queries.
Why should my script inspect the QA band before streaming reflective bands?
A scene with 10% total cloud cover might still place a dense cloud directly over your 400-hectare farm. Streaming the lightweight QA/SCL window first lets your pipeline abort cloudy dates early and save bandwidth.
Do I need an AWS S3 account to read STAC COGs?
Not necessarily. Many STAC endpoints provide standard HTTPS URLs or signed cloud URLs accessible directly via GDAL's `/vsicurl/` driver using standard HTTP range requests.
Primary References & Standards
- SpatioTemporal Asset Catalog (STAC) Core & API Specification v1.0.0
- OGC Cloud Optimized GeoTIFF (COG) Standard 1.0 (OGC 21-026)
- GDAL Virtual File Systems (/vsicurl/ and /vsis3/) Performance Tuning Guide