-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Background & Context
See EOPF-Explorer/landing-page#61
To resolve this, we need to pre-compute item counts at the end of the ingestion process and output them as static JSON files for the application to fetch.
Key Tasks
The pipeline needs to ideally generate two JSON Objects per STAC Collection:
- Daily aggregation
- Monthly aggregation (optional)
- This will help the user get a faster initial load in case of bigger collections
I suggest the structure of the file to mimic a datetime range Aggregation Collection response based on the Aggregation Extension to maintain STAC compliance, for e.g:
{
"type": "AggregationCollection",
"aggregations": [
{
"key": "datetime_daily",
"buckets": [
{
"key": "2026-01-01T00:00:00.000Z",
"value" : "8644819",
},
{
"key": "2026-01-02T00:00:00.000Z",
"value" : "5644819",
},
{
"key": "2026-01-03T00:00:00.000Z",
"value" : "7644819"
}
],
"interval": "daily",
}
]
}STAC Integration
I am unsure about what the best solution for this might be, considering STAC conformance and the effort required, here are a couple of suggestions that I can think of:
-
/aggregateEndpoint
To have it under/aggregatewithcollectionanddata_typeparameters, for examplehttps://api.explorer.eopf.copernicus.com/stac/aggregations?collection="sentinel-2-l2a"&data_type="interval_daily" -
Aggregation Links
Have links withrel: "aggregate"and indicate the interval using anaggregation:prefixed property for e.g.:
{
"rel": "aggregate",
"href": "https://example.com/timeline-daily.json",
"type": "application/json",
"title": "Daily Item Aggregation",
"aggregation:interval": "daily"
}or with the interval indicated in the rel property