Skip to content

owp-spatial/surface-stac-catalog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

surface-stac-catalog

This repository contains a script for creating or updating a SpatioTemporal Asset Catalog (STAC) using the CatalogManager class from stac_manager.

Installation

Ensure you have Python installed (>=3.8). Install the required dependencies:

pip install -r requirements.txt

Usage

The main.py script is designed to create or update a STAC catalog by processing elevation source data.

CLI Arguments

Argument Description Default Value
--catalog_path Path or URI for the STAC catalog Config value
--catalog_id Root Catalog ID Config value
--catalog_title Root Catalog Title Config value
--catalog_description Root Catalog Description Config value
--elevation_sources_path Path to the elevation sources data Config value
--verbose Print verbose output (default: True) True

Example

You can execute the script with default configuration values:

python runner/main.py \
  --catalog_path "s3://my-catalog-path" \
  --catalog_id "my_catalog" \
  --catalog_title "My STAC Catalog" \
  --catalog_description "A description of my catalog" \
  --elevation_sources_path "s3://elevation-data" \
  --verbose

Config

The script relies on a config.py file, which reads environment variables from a .env file if present. If the .env file is missing, it falls back to default values.

.env File (Optional)

You can define a .env file in the project root to override configuration values:

DEBUG=True
BASE_DIR="/path/to/catalog"
ROOT_CATALOG_ID="my_custom_catalog"
ROOT_CATALOG_TITLE="My Custom STAC Catalog"
ROOT_CATALOG_DESCRIPTION="My custom description"
ELEVATION_SOURCES_DATA_URI="https://my-data-source.com/elevationSources"

Default Configuration Values

If environment variables are not set, config.py will use sensible defaults:

DEBUG=True
BASE_DIR="./catalog/"
ROOT_CATALOG_ID="hf-surfaces-catalog"
ROOT_CATALOG_TITLE="hf-surfaces-title"
ROOT_CATALOG_DESCRIPTION="hf-surfaces-description"
ELEVATION_SOURCES_DATA_URI="https://owp-spatial.r-universe.dev/elevationSources/data/catalog_table/json"

License

This project is licensed under the Apache 2.0 License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published