Cloud Optimized GeoTIFFs (COGs) in Earth Engine

Google Earth Engine lets you work with raster data stored in your own Google Cloud Storage (GCS) buckets. By using Cloud Optimized GeoTIFFs (COGs), you can access and analyze your data directly in Earth Engine without having to ingest the pixels into Earth Engine's asset store.

This cloud-first approach offers several benefits, especially for managing large datasets or integrating Earth Engine into broader Google Cloud workflows or external tools and platforms.

Why use Cloud Storage and COGs?

  • Flexibility and interoperability: Keep your data in standard Cloud Storage buckets where it can be accessed by other tools and services. Whether you upload the data directly or export it from Earth Engine, Cloud Storage serves as a single source of truth for both Earth Engine and external workflows.
  • Data control and egress: Storing data in Cloud Storage provides standard object storage management capabilities. This lets you download, migrate, or share your data using Cloud Storage features like Requester Pays or public buckets, and manage access using standard Cloud IAM.
  • Flexible scaling: Avoid Earth Engine storage limits. Cloud Storage provides virtually unlimited, self-service storage scaling to petabyte scale.
  • No ingestion wait: Registering a COG completes rapidly because Earth Engine only reads the metadata (such as projection and dimensions) from the file header for indexing and validation. The actual pixel data remains in Cloud Storage and is read on-demand during computation, eliminating the need for a separate ingestion task.

COG workflows in Earth Engine

Earth Engine supports bidirectional workflows with COGs on Cloud Storage: you can read COGs directly from GCS into Earth Engine, and you can write computation results from Earth Engine directly to GCS as COGs.

Reading COGs from Cloud Storage

To bring GCS-hosted COGs into Earth Engine, you have two options:

  1. Direct loading (ee.Image.loadGeoTIFF): Load a single image directly using its GCS URI. This is best for quick tests, ad hoc analysis, or temporary data:

    JavaScript

    var image = ee.Image.loadGeoTIFF('gs://google-sample-bucket/my_image.tif');
    

    Python

    image = ee.Image.loadGeoTIFF('gs://google-sample-bucket/my_image.tif')
    

    For complete examples, see images from Cloud GeoTIFFs.

  2. Registered assets: Register one or more COGs as an Earth Engine asset using an upload manifest (see the COG registration guide). This is the recommended path for production workflows, especially when building image collections.

Feature Direct load (loadGeoTIFF) Registered asset (manifest)
Setup None (just GCS URI) Manifest (Python client, CLI, or REST)
Performance Standard (reads header on read) Optimized (indexed at creation)
Management No asset created Counts against asset count quota, not storage.
Use case Prototyping, ad hoc analysis Production workflows needing fast reads.

Writing COGs to Cloud Storage

To save Earth Engine computation results as COGs in your Cloud Storage bucket, use the Export.image.toCloudStorage batch export function (see exporting images) and set the cloudOptimized parameter to true in formatOptions. This tells Earth Engine to compile the image and write it directly to your GCS bucket as a fully compliant COG.

Supported Cloud Storage bucket locations

For Earth Engine to access your Cloud Storage bucket, the bucket must be located in one of the following data center regions or multi-regions:

  • The us multi-region
  • Any US dual-region that includes us-central1
  • The us-central1 region

If your bucket is placed in any other regional data center, Earth Engine will reject registration and read requests. Earth Engine accesses COGs stored exclusively in Google Cloud Storage buckets. External cloud storage providers and generic HTTP URLs are not supported.

Cost considerations and storage classes

When analyzing registered COG assets, reads from Earth Engine don't incur Cloud Storage read operation or data retrieval charges on your Google Cloud project.

You are billed by Cloud Storage primarily for standard monthly at-rest data storage (GB/month) and any external client data transfer or network egress fees (depending on your bucket location and client networking configuration).

Storage class recommendations

  • Standard storage (recommended): Standard storage is best suited for active Earth Engine workflows. Because it has no minimum storage duration rules, you can freely overwrite, update, or delete temporary COGs without incurring early deletion penalties. Furthermore, if you or your collaborators access the bucket using desktop GIS software, GDAL scripts, or machine learning notebooks outside of Earth Engine, Standard storage incurs zero retail retrieval surcharges.
  • Nearline, Coldline, and Archive storage: All Cloud Storage classes provide the same low-latency access and throughput as Standard storage, so there is no read performance penalty when using colder storage tiers in Earth Engine. While Earth Engine computations can also read these tiers without assessing retail data retrieval fees, Cloud Storage retail rules enforce strict minimum storage durations (30 days for Nearline, 90 days for Coldline, 365 days for Archive). Modifying or deleting files prior to their minimum duration triggers early deletion surcharges. Additionally, accessing cold objects from any external client tool incurs costly data retrieval surcharges.

For detailed retail pricing and minimum duration policies, see the Google Cloud Storage Pricing Guide.

High-level workflow

Typical workflows for using COGs in Earth Engine involve the following steps:

For importing external data:

  • Optimize: Convert your raster files to COG format using external tools (such as GDAL, local workstation scripts, or cloud processing pipelines).
  • Upload: Upload the COGs to a supported Cloud Storage bucket located in us-central1 or a US multi-region.
  • Permissions: Ensure you and any project collaborators have Cloud Storage read access to the files (see COG permissions).
  • Register: Use the Python client library, earthengine command-line tool, or REST API to register the COGs as Earth Engine assets (see COG registration).

For exporting results:

  • Export: Run a batch export from Earth Engine to Cloud Storage with cloudOptimized set to true (see exporting images).
  • Register (optional): Register the exported COG back into Earth Engine as a new asset for further analysis (see COG registration).

Ready to get started? Follow the detailed COG registration guide to register your first asset.