This repository contains one Python Jupyter Notebooks showing an example of creating and uploading a STAC collection.
To run the notebook locally execute the steps below (please note: the Anaconda Python environment has been tested on Linux Ubuntu 18.04, on Windows please use in step 3 the runtime optimized trimmed version environment_windows.yml
):
-
Install Anaconda to manage virtual environments. You can follow the instructions here.
-
Clone the repository and get into the repo folder:
-
A Terrascope account is required for the use of the stac-api. An account can be created at. Once the account is created, the credentials should be stored in a
.env
file in order to run the notebook (You can rename.env.example
file or create a new.env
file in the root folder). -
Create a new conda environment with the following command:
conda env create -f environment.yml
conda env create -f environment_windows.yml (use this line on Windows)
- Once the process is complete, you can activate the environment:
conda activate stacbuilder-notebooks
- Now you can start the Jupyter Notebook Server and use the notebooks, just typing:
jupyter notebook
- This should open up a new window in your default web browser, where you can select the notebook you prefer.
The notebook relies heavily on stac-catalog-builder for the creation of STAC collections, and helper methods to work with the stac-api.
Documentation on how to configure a new dataset can be found at link and can be applied to this notebook as well.
- Create a new folder under notebooks for the new dataset.
- Create a
config-collection.json
file at the root of the new directory. A template file can be found at config-collection.json, and fill the required fields in the file. - Once set up, the collection can be created with CLI commands (see docs), or a script.