pystac-client icon indicating copy to clipboard operation
pystac-client copied to clipboard

Support to write to STAC APIs

Open alvaro-ps opened this issue 2 years ago • 7 comments

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?

alvaro-ps avatar Jun 13 '22 09:06 alvaro-ps

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

gadomski avatar Jun 16 '22 13:06 gadomski

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

philvarner avatar Jun 21 '22 13:06 philvarner

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?

duckontheweb avatar Jun 27 '22 14:06 duckontheweb

@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.

tomkralidis avatar Jun 27 '22 22:06 tomkralidis

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.

duckontheweb avatar Jun 28 '22 16:06 duckontheweb

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?

tomkralidis avatar Jun 28 '22 22:06 tomkralidis

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.

duckontheweb avatar Jul 11 '22 15:07 duckontheweb