Skip to content

Commit d0438db

Browse files
authored
Register Stac (#1)
* Script for registering STAC entries in a catalogue, allowing overwriting existing entries or saving data without publishing.
1 parent bce708d commit d0438db

File tree

7 files changed

+499
-0
lines changed

7 files changed

+499
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,6 @@ cython_debug/
160160
# and can be added to the global gitignore or merged into this file. For a more nuclear
161161
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162162
#.idea/
163+
164+
# Configuration files
165+
*.yml

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# DhusPytools
22
Python scripts for Sentinel Data Hub
3+
4+
## [register_stac.py](./register_stac)
5+
Fetches data from Sentinel Data Hub and generates STAC metadata. Pushes the data to a catalogue.

register_stac/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Register Sentinel to STAC
2+
3+
The **register_stack.py** script fetches Sentinel 1, 2, 3 and 5P metadata from a data hub
4+
and transforms it into a [STAC](https://stacspec.org/en) format. It can publish the results to a STAC catalogue.
5+
The transformation is done by imported [stactools](https://github.com/stac-utils/stactools) modules.
6+
7+
## Dependencies
8+
Install dependent libraries with `pip install -r requirements.txt`.
9+
10+
## Configuration
11+
There are several ways to configure the script's behaviour:
12+
13+
**Preconfigured mappings**: The **stac_collections.py** file contains general constants that should be updated
14+
by developers if necessary. You can modify the options if needed.
15+
16+
**Configuration file**: The **register_stac.yml** contains the URLs to the Sentinel data hub host and the STAC catalogue
17+
host, log file prefixes and path to a location to save the data.
18+
19+
**Command line arguments**: The command line options supersede the configuration file settings. Run help to list all
20+
configurable parameters: `./register_stack.py -h`
21+
22+
**Authentication**: Basic auth is resolved automatically by the Requests library by reading a **~/.netrc** file. Make sure
23+
to set up the correct entries (Sentinel and STAC host URL) there.

0 commit comments

Comments
 (0)