-
Notifications
You must be signed in to change notification settings - Fork 122
Add a stac_io
argument in Catalog.save
?
#666
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
Comments
I see that if one reads a catalog with a user-defined |
Personally, I think that # Essentially the same as current implementation
def read_stac_object(
self,
source: Union[str, "Link_Type"],
root: Optional["Catalog_Type"] = None,
*args: Any,
**kwargs: Any,
) -> "STACObject_Type"
def write_stac_object(
self,
dest: Union[str, "Link_Type"],
stac_object: "STACObject_Type",
*args: Any,
**kwargs: Any,
) -> None This would create explicit entry-points for IO-operations and enable develops to easily create custom integrations for APIs and custom file protocols. |
@fnattino I would support adding a |
Apologies for the long delay with this - if still in time I can open a PR before the end of the week. |
It is nice how the STAC I/O has been refactored, with the possibility for the user to provide customised
StacIO
instances as argument toStacObject.save_object
(orItemCollection.save_object
).But shouldn't the catalog
Catalog.save
method also accept astac_io
argument to optionally specify theStacIO
to recursively write out all children and items?If you agree, I would be happy to contribute with a PR!
The text was updated successfully, but these errors were encountered: