stactools icon indicating copy to clipboard operation
stactools copied to clipboard

Add a subcommand to print a summary of static catalog

Open lossyrob opened this issue 5 years ago • 4 comments

From @cholmes via Gitter:

'catalog summary'. Reports back number of items in the whole catalog, and number of collections. Perhaps items per collection, but not necessary as I could just point the CLI at a collection directly to get that (since it's also a catalog).

This could be implemented as an info command:

> stactools info /some/catalog.json

a la gdalinfo and friends.

lossyrob avatar Aug 25 '20 13:08 lossyrob

For extension maturity, it would likely also be interesting if you could get all extensions implemented, divided per specification (catalog, collection, item).

By the way, is PySTAC able to generate the collection summaries field automatically from items?

m-mohr avatar Aug 25 '20 13:08 m-mohr

By the way, is PySTAC able to generate the collection summaries field automatically from items?

No, but that's a good feature request. Added https://github.com/stac-utils/pystac/issues/178 to track it, with an additional question for you.

lossyrob avatar Aug 25 '20 13:08 lossyrob

Thanks @lossyrob - I was actually halfway through writing this up, thanks for getting it in. And I'd say it ideally would work on STAC API's as well.

cholmes avatar Aug 25 '20 20:08 cholmes

This is implemented in the stac info and stac describe commands for static STACs. Leaving this open for the inclusion of working with STAC APIs.

lossyrob avatar Nov 03 '20 15:11 lossyrob