stac-utils / stactools

Command line utility and Python library for STAC
https://stactools.readthedocs.io/
Other
104 stars 28 forks source link

stac copy pulls in external catalogs/collections in structures #449

Open constantinius opened 1 year ago

constantinius commented 1 year ago

Is your feature request related to a problem? Please describe.

I'm using stac copy to publish a self contained catalog to make an absolute published one, since this currently seems to be the only viable tool to do that.

With stac copys flag --no-resolve-links it is possible to only copy a single catalog and not resolve any of its children or items.

This works fine for single catalogs, but it is impossible to copy larger structures of STAC catalogs, where somewhere external references should not be internalized.

Consider the following structure:

root
  -> child
      ----------------------------------> external item

Here I want to copy root and child to the new location, but I don't want to copy the external item.

Describe the solution you'd like / Describe alternatives you've considered

Either stac copy should receive an extra argument, where extranenous files shall not be pulled into the structure upon copy, or another command should be made that only changes the hrefs of an existing catalog to make it absolutely published.

Additional context