Converting a STAC Asset to Cloud Optimized GeoTIFF (COG)

Divya Sakpal
Divya Sakpal
  • Updated

Introduction

Spatio-Temporal Asset Catalog (STAC) is a standardized catalog format for organizing geospatial data with time and location references. It centers around detailed metadata that describes each dataset’s spatial extent, time range, properties, and available assets. STAC uses a JSON-based structure for cataloging datasets and assets to make data discoverable and machine-readable via APIs and search engines.

The STAC specification consists of three core components: a Catalog, a Collection, and an Item. A Catalog is the starting point for navigating a STAC, and it can contain links to a combination of Catalogs, Collections, and/or Items. Each STAC item has one or more Assets, which include links to the actual files.

In this tutorial, we will use the STAC Asset Reader to read a mosaic geotiff of Houston, Texas, convert it to Cloud Optimized GeoTIFF format, and then upload it to an Amazon S3 bucket.

The STAC format is supported from FME 2023.0+. However, it is recommended that you use the latest version for all Cloud-Native formats.

 

Step-by-Step Instructions

1. Open FME Workbench and Add a Reader

In FME Workbench, start with a blank workspace and add a reader by clicking on the Reader button.

  • Format: STAC Asset
  • Parameters:
    • STAC Type: API
    • URL:  https://www.planet.com/data/stac/catalog.json
    • Use Authentication: Unchecked

 Continue to Step 2 to select the catalog or collection, item, and asset before clicking OK. 

The Dataset is greyed out in the Add Reader window because STAC data typically exists in a cloud environment. The STAC Asset Reader in FME reads actual data files (like a raster) linked to an STAC item. 

Use the STAC Metadata reader when you only need to inspect or read metadata (like geometry, datetime, or properties), or if you want to look for dataset links in a parent workspace and pass those to child workspaces to process.

 

2. Select the Catalog or Collection, Item, and Asset

  • Catalog or Collection: planet-distaster-data > hurricane-harvey > hurricane-harvey-0831
    • Click on the ellipsis to select the catalog or collection
  • Item: Houston-East-20170831-103f-100d-0f4f-RGB
    • Click on the ellipsis to select the item.
  • Asset: mosaic (GEOTIFF)

Click OK twice to finish adding the reader. 

 

3. Inspect the Data

Run the workspace with Feature Caching Enabled. View the cached feature in Data Preview (formerly Visual Preview). 

 

This will open the Data Preview window. The image seems to be georeferenced correctly, but it does have a black, No-Data border. 

Before we remove No Data, let’s expose the fme_feature_type parameter on the reader so it can be used downstream. 

 

4. Expose the fme_feature_type Attribute

Double-click the reader feature type and switch to the Format Attributes tab. Click on the checkbox next to fme_feature_type and then click OK. 

 

5. Set No Data using RasterBandNoDataSetter

Add the RasterBandNoDataSetter transformer to the canvas and connect it to the reader feature type. In the parameters, set: 

  • Nodata Value: 0

 

6. Convert the STAC GeoTIFF into Cloud Optimized GeoTIFF

Add and connect the FeatureWriter to the RasterBandNoDataSetter transformer,  and double-click the FeatureWriter to open the FeatureWriter parameters:

  • Format: CoG (Cloud-Optimized GeoTIFF)
  • Dataset: .\Output
  • Raster File Name: fme_feature_type
    • Click the drop-down and select the previously exposed fme_feature_type attribute
  • File Structure:
    • Layout: Cloud Optimized Tiles
    • Number of Columns per Tile: 512
    • Number of Rows per Tile: 512

Selecting Cloud Optimized Tiles ensures that the raster is written with a fully COG-compliant structure. Since we are using very high-resolution imagery, entering 512 x 512 in rows and columns reduces file bloating due to tile count. LZW compression is recommended for raster data as it provides efficient, lossless compression.

 

7. Upload Cloud Optimized GeoTIFF to Amazon S3

Add an S3Connector transformer to the canvas, connect it to the FeatureWriter transformer, and double-click on the S3Connector transformer to open its parameters:

  • Credential Source: Embedded
  • Embedded Credentials:
    • Access Key ID: <your key ID>
    • Secret Access Key: <your secret access key>
    • Session Token: <your session token>
  • Request:
    • Action: Upload
  • Data Source:
    • Upload: File
    • File to Upload: @Value(_dataset)\@Value(_feature_types{0}.name).tif
  • Upload Options:
    • Bucket: <your bucket>
    • Path: <your path>

 

8. Run the Workspace

Run the workspace after all the parameters have been set up correctly. Your newly created Cloud Optimized GeoTIFF should be uploaded to your desired S3 bucket! 

 

9. Inspect the Output

You can inspect the output of our transformation by adding a COG reader in a new FME Workbench or by opening the output COG in FME Data Inspector.

Click Open in FME Data Inspector

  • Format: CoG (Cloud-Optimized GeoTiff)
  • Dataset: Browse from Amazon S3
    • Click on the drop-down next to the Dataset. Expand Select File From Web and select Browse Amazon S3
  • Coordinate System: SPHERICAL_MERCATOR

This will open the options to set AWS connection settings. You can use the same settings as the S3Connector from earlier.

As of FME 2025.2, the Coordinate System parameter is now configured within the Parameters dialog of each reader/writer format. For more information, including details about the change and affected transformers, please see Coordinate System Parameter Location Change.

We will set the parameters to read a small portion of the output data since it is huge and might stall FME Data Inspector.

  • Parameters:
    • Use Search Envelope: Checked
      • Minimum X: -95.378494
      • Minimum Y: 29.743960
      • Maximum X: -95.347767
      • Maximum Y: 29.766464
      • Search Envelope Coordinate System: LL84
      • Clip to Search Envelope: Checked

Then click OK twice. 

 

 

Data Attribution

Planet has made the data available publicly for this tutorial. For more information on the company, visit https://www.planet.com/.

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.