After processing your satellite data, you need reliable and easy-to-use access to your products.

FarEarth for SmallSats Catalogue supports various technologies for searching and accessing data in the Archive. In this blog, we explore two of the many options: custom collections and API access.

Dynamic collections

The STAC specification provides a collection field as part of the STAC Item. The collection needs to be specified as part of the item itself, which means it must be known at the time of product creation.

In FarEarth, we have implemented a dynamic method for creating collections, utilising the STAC query formats. This allows users of the FarEarth Catalogue to create collections of products without needing to update any products already in the Archive.

Below is an example of a collection of all Level 1C products for the TRUBIT-1 satellite.

An administrator can edit the collections in the Gateway. For more information, see our public collection documentation on GitHub.

Accessing products with the STAC API Browser in QGIS

FarEarth supports standardised STAC products and APIs, which makes it easy to work with your data in GIS applications.

To get started, generate an API key in the Gateway from the Users page (see our API documentation for details).

As an example, you can use the STAC API Browser plugin in QGIS to query and retrieve the data directly from a FarEarth Catalogue.

Configure the connection point to the Gateway.

For authentication, you add the ‘X-API-Key’ header with the API key obtained from FarEarth.

You can now search using the plugin, including collections you previously configured.

Use the “View assets” button to choose individual files that form the product.

You can add the images as layers directly to QGIS. FarEarth uses Cloud Optimised GeoTIFFs (COGs) by default. QGIS does not have to download all the data before you can work with it; it will fetch the pixels as needed.

Accessing products with the API

Let’s examine a more advanced use case for accessing data using Python. We have a few Python examples to get you started. These examples use the PySTAC library to make things easy.

You can also use collections in your API queries. The example below uses the L1C collection shown above, with a specific AOI over Spain. We added a custom query to limit the products to those with an incidence angle of 25 degrees or less. We also sorted the results by the incidence angle in ascending order.

In STAC products (items), each file is represented as an ‘asset’. Each asset contains a URL (href) to the file. FarEarth generates a short-lived URL, so STAC clients do not need their own access credentials. Our Catalogue supports multiple protocols and provide access to external data sources. Using this transparent authorisation method means data consumers do not have to worry about different archive technologies and unique access keys.

Next, we iterate over the assets to find files with the ‘data’ role. In this case, we specifically look for the BGRN multispectral image file to save it to disk.

Now that you have access to the data, you can use Python libraries such as ‘Rasterio’ to compute, for example, the NDVI of a product.

The NDVI calculation itself is easy, with additional tricks to maintain the ‘nodata’ value in the calculated NDVI product.

And that’s it! We have created a collection that automatically includes all the Level 1C data for a specific mission. We have used the collection in external software such as QGIS’s STAC API Browser. We queried the collection with the PySTAC library and calculated an NDVI.