stac-utils / pystac-client

Python client for searching STAC APIs
https://pystac-client.readthedocs.io
Other
152 stars 47 forks source link

Support to write to STAC APIs #241

Open alvaro-ps opened 2 years ago

alvaro-ps commented 2 years ago

Hi, thanks for the great work so far 👍🏻 💯 I was wondering if there is any plan to add functionality to write data to STAC APIs as well as reading from them?

gadomski commented 2 years ago

@philvarner would be an appropriate person to comment here, as he knows way more about the transactions API than I do.

philvarner commented 2 years ago

No plan that I'm aware of (and @gadomski would likely be more aware of a plan than I would).

duckontheweb commented 2 years ago

I'm working on a data catalog infrastructure right now that would benefit from this functionality, but I'm wondering what the best home would be for it.

@philvarner correct me if I'm wrong, but my interpretation of the Transaction Fragment in the API spec is that STAC API Transactions intends to align with OGC API Features transactions once it is out of the draft state. If that is the case (and we are not adding any additional functionality in the STAC API spec), then would it make more sense to support this in OWSLib, since that is the primary OGC API client? @tomkralidis what are your thoughts on this?

tomkralidis commented 2 years ago

@duckontheweb if that's the case then I think an addition in OWSLib makes sense and is most welcome! Let me know once you start drafting things, as I can see Transactions in OGC API being applied to OGC API - Records (and potentially other OGC APIs) as well, so this can be implemented as a shared capability in the codebase.

duckontheweb commented 2 years ago

Let me know once you start drafting things, as I can see Transactions in OGC API being applied to OGC API - Records (and potentially other OGC APIs) as well, so this can be implemented as a shared capability in the codebase.

Yeah, it would be nice to come up with some abstraction that works for multiple OGC API specs. It looks like there are already transactions built into the CSW module of OWSLib, but I'm not familiar enough with that codebase to know if it would translate to OGC API - Features and others.

tomkralidis commented 2 years ago

The CSW transaction code is based on the OGC CSW - Manager class. In today's OGC API ecosystem, transactions are defined in OGC API - Features - Part 4: Create, Replace, Update and Delete, hence this would make sense in owslib.ogcapi.features. Perhaps we can discuss this in a dedicated OWSLib issue?

duckontheweb commented 2 years ago

After looking at the OWSLib code in more detail I think there would be value in implementing transactions separately in pystac-client. The usage pattern of OWSLib is very different from this library and I think it might be confusing for pystac-client users to have to install and learn another dependency in order to use the Transactions endpoints. I can work on implementing that in pystac-client and see if any of it is transferable to OWSLib.