-
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
Adding ItemCollection to PySTAC #302
Comments
I would support including Item Collections in PySTAC. I know that in the current specs it is only used in an API, but there could be other uses of it within the core spec or within other extensions that aren't tied to the API (in addition to @matthewhanson 's use-case above). Putting it in PySTAC would let us take advantage of all the validation, links, and other convenience methods a little more cleanly. |
While I do think valuing keeping to the spec will help with clarity and to future-proof things, all of the points made here are very convincing. 👍 I think we should do it. |
In thinking more about this I think that ItemCollection should not be a STAC object as I had previously suggested, so it wouldn't have I see an ItemCollection as useful in PySTAC as a utility class. It should be able to:
Then I see convenience functions for going from a catalog branch -> ItemCollection and converting an ItemCollection to a static structure. I stripped down the class @duckontheweb initially created of all API features and created a branch with an initial implementation: https://github.com/stac-utils/pystac/blob/mah/itemcollection/pystac/item_collection.py For now, we're also including it in pystac-api-client https://github.com/stac-utils/pystac-client/blob/main/pystac_client/item_collection.py |
I agree. Since it's now an extension and not part of the core, having the
I'm not sure I understand this part. Is this referring to making
This sounds fine for now, but is the plan to eventually only have it in PySTAC? I don't think it makes sense to maintain it in 2 places long term, so we should make sure whatever gets implemented in PySTAC also works for the |
Was this closed by #430? |
Yes, thanks. |
An Item Collection is defined in pystac-api-client, which will be updated to use the Item Collection extension.
The Item Collection is used for API responses which can then be saved as GeoJSON ItemCollections. Having this defined in pystac-api-client makes sense because it's used in the API and is not a core STAC object.
However, I'm thinking of creating some additional libraries that I want to operate either on STAC catalogs OR on a saved FeatureCollection. The ability to open an ItemCollection and iterate through items, retrieve the parent of collection of an item, or even save as a regular catalog would be very helpful.
Basically I want to be able to use PySTAC features to work with STAC objects, including Item Collections, but I don't have a need for an API client library because it wouldn't use anything else in that library, it just wants to use STAC objects. Seems like it would be cleaner to implement this in PySTAC rather than require libraries to include a dependency to the api client to get the ItemCollection implementation.
The text was updated successfully, but these errors were encountered: