STAC APIs
The FarEarth Catalogue supports SpatioTemporal Asset Catalog(STAC) and will work with any of the examples and tutorials designed for the various STAC clients.
Getting started
Download examples
- Download the constants.py and requirements.txt file
- Download one of the examples listed below
Prepare the environment
python -m venv pystac
cd pystac
Activate your environment
This step is dependent on your platform. Instructions can be found here: https://docs.python.org/3/library/venv.html. For Windows (.bat), use the following:
./Scripts/activate
Install the dependencies
python -m pip install -r requirements.txt
Configure API key
- See how to generate API key
- Add the API key to your environment, under the name of 'FE3_API_KEY'
To get started testing quickly, you may replace /os.environ['FE3_API_KEY'] in each of the files with R"KEY" where the word KEY is replaced by the key generated in FarEarth.
Run the example script
- Run the example with the
pythoncommand - If successful it will return a list of the specifications that the FarEarth API conforms to and confirm that everything is working as intended
For example, to run the catalogue_info.py example:
python catalogue_info.py
The command above will generate the following output:
The FarEarth STAC API conforms to the following specifications:
https://api.stacspec.org/v1.0.0/core
https://api.stacspec.org/v1.0.0/collections
https://api.stacspec.org/v1.0.0/ogcapi-features
https://api.stacspec.org/v1.0.0/item-search
https://api.stacspec.org/v1.0.0/ogcapi-features#fields
https://api.stacspec.org/v1.0.0/ogcapi-features#sort
https://api.stacspec.org/v1.0.0/ogcapi-features#query
https://api.stacspec.org/v1.0.0/item-search#fields
https://api.stacspec.org/v1.0.0/item-search#sort
https://api.stacspec.org/v1.0.0/item-search#query
https://api.stacspec.org/v0.3.0/aggregation
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30
http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson
Examples
View complete examples below.
These examples have been compiled using the libraries listed in this requirements file.
Some of the examples requires the constants.py file.
All the examples rely on pystac_client.