dea_tools.mosaics.cog
Generate Cloud Optimised GeoTIFF (COG) mosaics for DEA tiled products.
This module builds continental-scale mosaics by combining individual DEA tiles into a single Cloud Optimised GeoTIFF using GDAL tools (gdalbuildvrt, gdal_translate). It supports DEA’s tiled product structure and naming conventions and can read from both local disk and public S3 buckets (e.g., dea-public-data or dea-public-data-dev).
Input Format
Input products must follow the DEA Collection 3 naming conventions and file structure, e.g.: s3://dea-public-data/derivative/<product>/<version>/<tile path>/<year>–<freq>/<product>_<tile path>_<year>–<freq>_<dataset maturity>_<band>.tif
For more information: https://knowledge.dea.ga.gov.au/guides/reference/collection_3_naming/ https://knowledge.dea.ga.gov.au/guides/reference/collection_3_summary_grid/
Output Format
Mosaics are saved as: <output_dir>/<product>/<version>/continental_mosaics/<time>–<freq>/<product>_mosaic_<time>–<freq>_<band>.tif
License: The code in this module is licensed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0). Digital Earth Australia data is licensed under the Creative Commons by Attribution 4.0 license (https://creativecommons.org/licenses/by/4.0/).
Contact: If you need assistance, please post a question on the Open Data Cube Discord chat (https://discord.com/invite/4hhBQVas5U) or on the GIS Stack Exchange (https://gis.stackexchange.com/questions/ask?tags=open-data-cube) using the open-data-cube tag (you can view previously asked questions here: https://gis.stackexchange.com/questions/tagged/open-data-cube).
If you would like to report an issue with this script, you can file one on GitHub (GeoscienceAustralia/dea-notebooks#new).
Last modified: July 2025
Functions
|
Generate a COG mosaic for a given tiled DEA product. |
- dea_tools.mosaics.cog.make_cog_mosaic(product, band, time, freq, version, dataset_maturity, product_dir, output_dir, cog_blocksize, overview_count, overview_resampling, compression_algo, compression_level, aws_unsigned, skip_existing, list_tiles=None, vsi_method='vsicurl')[source]
Generate a COG mosaic for a given tiled DEA product.
Products must follow the DEA Collection 3 naming conventions and file structure: https://knowledge.dea.ga.gov.au/guides/reference/collection_3_naming/ https://knowledge.dea.ga.gov.au/guides/reference/collection_3_summary_grid/
Parameters:
- productstr
The name of the DEA product (e.g. ‘ga_ls_landcover_class_cyear_3’).
- bandstr
The variable or band to extract.
- timeint or str
The target time of the mosaic, year if annual summaries (e.g. ‘2023’), year-month for seasonal (e.g. water observations nov_mar –> ‘2024-11’)
- freqstr
The frequency of the summary product (e.g. ‘P1Y’).
- versionstr
Product version (e.g. ‘2-0-0’).
- dataset_maturitystr
Dataset maturity stage. Usually: ‘final’.
- product_dirstr
S3 directory for the product. Usually ‘s3://dea-public-data/derivative/’, which is the DEA public bucket and derivates products folder, which corresponds with https://data.dea.ga.gov.au/derivative/ HTTPS endpoint.
- output_dirstr
local directory or s3 directory where to save output.
- cog_blocksizeint or str
Size of internal COG tiling. Use 1024, unless there are specific reasons to use a different value.
- overview_countint or str
Number of image overviews to generate. Use 7 for 30 m resolution products (like Landsat), use 8 for 10 m resolution products (like Sentinel-2).
- overview_resamplingstr
GDAL resampling method used when building overviews. Options include (use all capital letters): - ‘MODE’ for categorical data (e.g. land cover), - ‘BILINEAR’ for continuous data, - ‘NEAREST’ for narrow continuous data with many nodata pixels (e.g., coastal products).
- compression_algostr
GDAL compression algorithm used for output COG. Use ‘ZSTD’, unless there are specific reasons to use a different algorithm.
- compression_levelint or str
Level of compression of output COG. Use 9, unless there are specific reasons to use a different level.
- aws_unsignedbool
Whether to sign AWS requests for S3 access.
- skip_existingbool
Whether to skip generation if output already exists.
- list_tileslist of strings, optional
List including tiles of interest to include in the output mosaic. For example: [‘x25y41’, ‘x25y41’]. Defaults to None –> use all tiles available.
- vsi_methodstr, optional
Whether to use “/vsicurl/” for HTTPS-based URIs in the interim Virtual Raster (“vsicurl”), or “/vsis3/” for accessing data directly from AWS S3 (“vsis3”). Default is “vsicurl”.
Notes:
All other gdal_translate parameters are intentionally omitted in this function. These options should be standardized across all products, and are applied consistently as part of downstream processing.