stac-spec
stac-spec copied to clipboard
Catalog item count
The FedEO Clearinghouse STAC implementation does a nice summarizing of how many items are in each catalog. It's quite useful to be able to navigate around. See https://stacindex.org/catalogs/fedeo-clearinghouse#/5nc6NjkK1CgBqG8HCgekPHXMn?t=catalogs
But the way they do it is just adding the count to the title, so it shows up in STAC Browser. It'd be better to support it as a first class object that clients can use directly.
A few different approaches were discussed on gitter - putting it in the stats object, making it a new optional field, and reusing the 'context' extension from the stac api.
It seems we are mixing things up here. Are you referring to the numbers in brackets? Then these need to be part of the links, not part of the catalog/collection. If you want them in catalog/collection, I think a more general version of the context extension would make sense, which the context extension in the API would then base on.
For static catalogs such a field doesn't work well if it's updated regularly. Maybe this is really just a field that should be defined in the API but not in the core STAC spec?
Oh right, to display at the level above it needs to be in the links. I was thinking it'd be better to have an actual field, like STAC Browser would display 'number of items' on a catalog it viewing. So I guess we could/should have both, so if you are looking at a catalog it tells you the number of items it has, not just in the sub-catalogs below.
I think it'd be an optional field, so static catalogs don't have to update it. But I think it belongs in core because it's not part of the /search/
endpoint. The core can be implemented statically or dynamically, but catalogs that are hosted on S3 but see lots of updates of all their catalogs may choose not to implement it. But some static catalogs don't have updates, and. some might only update of their catalogs.
But I think it belongs in core
But starts in an extension, right?
Maybe consider supporting an optional attribute similar to thr:count as part of the links ? (See https://datatracker.ietf.org/doc/rfc4685/).
Closing due to inactivity.