-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: what should happen when self-contained STACs are copied? #61
Comments
I think maybe this could be a broader question. |
PySTAC tries to maintain the correct path to the asset file if a self contained STAC is copied. So if an item is moved to a new HREF, it will setup a relative path to the original asset HREF according to the new item HREF. It does not do any asset copying. If the asset is copied, then that new asset should replace the old asset HREF in the copied item. Another option would be to leave relative paths as-is in copied items. However, since PySTAC specifically doesn't do the asset copying (which is intentional, as it's not always clear you want a copy of the heavy asset data when you copy the metadata). The downside to that is that now an Item points to an asset HREF that doesn't exist. What do you think should happen? Currently, |
Reviving this interesting discussion. I was actually going to propose that SELF_CONTAINED catalog could be removed. The only difference between it and RELATIVE_PUBLISHED is the inclusion of an absolute self link at the root in RELATIVE_PUBLISHED. However, I could see a SELF_CONTAINED catalog as being strictly defined as one that is all relative links and has assets that are located alongside the Items (i.e., the same directory). In this case I think it would be useful to be able to delete Items, and corresponding local assets. And maybe you want to move branches of catalogs around. But if you were going to just copy the catalog elsewhere you could do that just saving it as a RELATIVE_PUBLISHED catalog and copying the entire tree somewhere else. Are these use cases worth supporting? |
Moving and copying assets is currently handled by stactools, which can use third-party packages (e.g. fsspec) to do I/O on non-local filesystems. However, I could see the argument for adding local-only asset management to PySTAC, which would still be within scope for this package. This nothing to do with the
I find the If #911 is rejected, then I think this issue can be closed, because PySTAC wouldn't be supporting data file move/copies anytime soon. If #911 is accepted, we should then answer the question of whether move/copy should be extended to |
I have a STAC that includes a bunch of chips of tifs. When I clone that STAC, I keep all of the items, and the assets point to the old tifs. I don't think this is necessarily wrong. I'm curious whether it's a deliberate choice to leave the references to the old tifs and not copy the tifs into the new stac or whether that's something that happened incidentally. I can see arguments for both ways --
In favor of not copying the data:
In favor of being able within PySTAC to copy the data (obviously I can do whatever I want outside of PySTAC):
The text was updated successfully, but these errors were encountered: