Skip to content

Add script for processing and converting raster data to STAC format#2

Draft
manuvanegas wants to merge 6 commits intoopenskope:mainfrom
manuvanegas:main
Draft

Add script for processing and converting raster data to STAC format#2
manuvanegas wants to merge 6 commits intoopenskope:mainfrom
manuvanegas:main

Conversation

@manuvanegas
Copy link
Copy Markdown
Contributor

Slicing COGs into ~100-band files. Creates an accompanying lookup dictionary to speed up backend's correct file and band location.

Splits the monolithic convertto_stac.py into five focused modules under
cog_stac_pipeline/, each responsible for one pipeline concern:

- cog_builder.py     — GDAL band slicing and COG conversion
- stac_builder.py    — STAC item/collection/catalog creation and lookup dict
- metadata.py        — YAML metadata validation and auto-patching
- datetime_utils.py  — ISO key formatting and date range helpers
- main.py            — configuration and top-level orchestration

Also extracts three helper functions from the 133-line process_variable:
populate_slice_lookup, create_stac_item_for_slice, and build_cog_slice,
reducing the orchestrator to ~45 lines.

Adds README.md documenting inputs, outputs, configuration, and module roles.
Updates .gitignore to track the new folder alongside styles/ and geometries/.

Original convertto_stac.py is retained as a legacy reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant