What about if we want to get a satellite imagery from a specific time, let's say a satellite imagery of an area within December 2023? In this tutorial we will discuss about it. Keep reading!
What is Spatio Temporal Asset Catalog(STAC)?
The Spatio Temporal Asset Catalog (STAC) is a foundational framework that
offers a universally accepted structure for the comprehensive description
and systematic cataloging of temporal assets. This standardized approach
facilitates the seamless integration and management of diverse datasets
across various spatio temporal domains, fostering enhanced accessibility,
interoperability, and usability within geospatial and temporal data.
Learn more about STAC.
Using the STAC tool we can find any spatio temporal assets like Imagery,
SAR, Point Clouds, etc, including other properties and metadata
information.
How to Use STAC in QGIS?
In QGIS we can use STAC to search any spatio temporal assets using STAC API Browser Plugin. To use it we have to install it first with the following steps:
1. From the top toolbar menu select Plugins > Manage and Install Plugins...
2. The plugin installation window will appear as in figure 1. In the
searching menu type "stac". The related plugins will appear. Select
the STAC API Browser. Click Install Plugin button to install
it.
Figure 1. STAC API Browser Plugin Installation |
After installing the STAC API Browser let's use it to find any spatio temporal data like imagery.
When opening the plugin, the STAC API Browser window can be seen as
in figure 2. Firstly let's discuss about two important properties in the
STAC plugin. The first one is connections. It defines an URL where the
resource of a data is located. For example:
https://planetarycomputer.microsoft.com/api/stac/v1. This is the URL
of
Microsoft data. The second one is collection that list all available data from the
respected provider.
To get what data available from a provider can be check out in the
collection. Sometimes when adding a new data source, the collection will not
populate automatically, for that click the Fetch Collections button
to look for it.
Figure 2. STAC API Browser Window |
To obtain detail information from a connection, you can get it from the Edit button. The Edit Connection window is the same with adding a new connection. In this window we have to define a connection's name, URL and a subscription key if it's required. See figure 3.
Figure 3. STAC API Browser Edit Connection Window |
Searching Imagery and Other Data Using STAC API Browser
Now it's time to search an imagery. To search an imagery using STAC can be done with the following steps:
1. In QGIS add a basemap like Google Map. You can add a basemap easly in QGIS with the Tile+ plugin.
2. Zoom in to your area of interest (AOI). In this case I'd like to download a Sentinel-2A imagery of Gaza, Palestine. Therefore I zoom in to it as seen in the figure 4.
Figure 4. Gaza-Palestine AOI |
3. Select a collection. For this case I want to search for
Sentinel-2A imagery. Select Filter by date option to define a
time range. For area extent, there are several options. It can be defined by
the extent of a layer, map layout, draw to map canvas or define from
map canvas extent. In this case I chose the last one.
Figure 5. Defining Searching Parameters |
4. After defining all searching parameters. Click the Search button.
You can see the result in the Results tab as seen in the figure 6. In
the result's tab, you can see the asset's ID, Date and
Cloud Coverage. To select an asset that is fit with your AOI, enable
the Select footprint option and Add the selected footprint to
map canvas. You can see the footprint's polygon as in the right of figure
6.
Figure 6. STAC Results |
7. After finding the right image, now let's view the asset. Click the
View assets button. The assets window will appear as in figure 7. You
can see all assets from this collection. To view an asset in the QGIS map
Canvas, check the Select to add as a layer option following with
clicking Add selected assets as layers button at the bottom. The
selected assets will added into QGIS map as in figure 8.
Figure 7. STAC Assets Window |
Figure 8. True Color Sentinel-2A Imagery |
8. To download the asset, check Select to download option. At the bottom window click Download the selected assets button. The download folder can be seen in the Settings option. You can also change the download folder in the setting.
With the same approach we can find for other dataset. Below are some sample datasets in the respected region.
Figure 9. 10 m Annual Land Use Land Cover |
Figure 10. Copernicus Global DEM |
That's all this tutorial on how to search satellite imagery and other temporal data with STAC API Browser plugin in QGIS. STAC API Browser gives a convenient way in finding satellite imagery and other spatio temporal data. All you need to do is finding a resource provider with an URL address. Hope it's useful. Thank you for reading.
Anyway if you want to learn how to use STAC in Python, check out PySTAC tutorial!