Open drnextgis opened 7 months ago
Yeah, this has definitely been on my back burner. Much like the context extension, for very large STAC repositories, pgstac is not going to be able to perform nearly as well as something like ElasticSearch but it can still be super useful, especially when combined with filters that limit the amount of data that would need to be represented in the aggregation.
I think a good first step without implementing configurable general purpose aggregation would be to have an endpoint that follows the aggregation extension and just did a count per collection (which given that collections are partitions, we could even do as estimated counts much like the estimated count we have as an option for the context extension).
I'm not entirely sure when I'll get around to this though. I'd definitely be happy to pair with someone to work on this!
It would be nice to have it but I'm uncertain about the performance of aggregating with PostgeSQL since this storage isn't designed for such tasks.
https://github.com/stac-api-extensions/aggregation