Export STAC collections from pgSTAC to GeoParquet format with support for complete and incremental exports.
- Complete Export: Full export of collections with optional yearly partitioning
- Incremental Export: Sync only changed items since last run
- Configuration-based: YAML config for collections and partitioning strategy
pip install -e .Set required environment variables:
export PGHOST=localhost
export PGPORT=5432
export PGDATABASE=pgstac
export PGUSER=postgres
export PGPASSWORD=secret
export CONFIG_PATH=/path/to/export-config.yaml
export OUTPUT_PATH=/output
export EXPORT_MODE=incremental # or "complete"Run the exporter:
python -m pgstac_geoparquet_exporterCreate export-config.yaml:
collections:
- name: sentinel-2
partition_by: year
start_year: 2015
- name: landsat
partition_by: null # Single fileBuild:
docker build -t pgstac-geoparquet-exporter .Run:
docker run --rm \
-e PGHOST=localhost \
-e PGDATABASE=pgstac \
-e PGUSER=postgres \
-e PGPASSWORD=secret \
-e EXPORT_MODE=incremental \
-v $(pwd)/config:/config \
-v $(pwd)/output:/output \
pgstac-geoparquet-exporterComplete: Exports entire collections. With yearly partitioning, creates separate files per year.
Incremental: Tracks last sync time and exports only updated items. State stored in {OUTPUT_PATH}/.last_sync.