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.
See pystac examples for sample Python files that demonstrate these APIs. All the examples rely on pystac_client
Getting started
- Clone the code
git clone https://github.com/FarEarth/farearth-docs/tree/main/integration/api/examples
cd farearth-api-examples/catalogue
- Prepare the environment, the following uses
venv, replace with conda or other Python environment management system if you wish
python -m venv pystac
cd pystac
- Activate your environment, this 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 once your environment is activated
python -m pip install -r requirements.txt
-
Generate an API key by following the instructions in the section below
-
Add the API key to your environment variables under the name '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 catalogue info script, if successful it will return a list of the specifications that the FarEarth API conforms to and confirm that everything is working as intended
python catalogue_info.py
- Sample output of the catalogue_info.py
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
Generating an API key
All of the examples in this repository require an API key. Follow the steps below to generate your API key.
- Navigate to the USERS menu
- Click on your user's e-mail address
- Click on CREATE to generate an API key
- If you would like to remove access for an API key, click REMOVE
