stac-spec icon indicating copy to clipboard operation
stac-spec copied to clipboard

Catalog item count

Open cholmes opened this issue 4 years ago • 4 comments

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.

cholmes avatar Sep 21 '20 15:09 cholmes

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?

m-mohr avatar Sep 21 '20 15:09 m-mohr

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.

cholmes avatar Sep 21 '20 20:09 cholmes

But I think it belongs in core

But starts in an extension, right?

m-mohr avatar Jan 14 '21 23:01 m-mohr

Maybe consider supporting an optional attribute similar to thr:count as part of the links ? (See https://datatracker.ietf.org/doc/rfc4685/).

ycespb avatar May 18 '22 13:05 ycespb

Closing due to inactivity.

PowerChell avatar May 02 '23 16:05 PowerChell