Skip to content

Need to implement eo extension for collections #319

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

Closed
schwehr opened this issue Apr 30, 2021 · 17 comments
Closed

Need to implement eo extension for collections #319

schwehr opened this issue Apr 30, 2021 · 17 comments
Assignees
Milestone

Comments

@schwehr
Copy link
Collaborator

schwehr commented Apr 30, 2021

https://github.com/stac-extensions/eo

Electro-Optical Extension Specification says:

pystac only implements EOItemExt

@schwehr schwehr self-assigned this Apr 30, 2021
@lossyrob
Copy link
Member

lossyrob commented May 1, 2021

I believe that's a bug in the spec. What does Collection implement? There is no mention of collections elsewhere; I think this may be a holdover from when Collections had properties that could hold common item properties, and eo information was often held there.

@schwehr
Copy link
Collaborator Author

schwehr commented May 1, 2021

Earth Engine currently only has stac collections and we need the band info in collections

@lossyrob
Copy link
Member

lossyrob commented May 1, 2021

I think what you're looking for is summaries and/or item_assets.

Summaries for the eo extension are implement on the branch here. item_assets are implemented here. This makes me think we may want to include AssetDefinitions as objects that can be wrapped in an extension so that the extension objects can be used to retrieve extension properties from asset definitions.

@lossyrob
Copy link
Member

lossyrob commented May 4, 2021

Based on radiantearth/stac-spec#1078 I think my understanding may be outdated (by 18 days). Asking some clarifying questions on Gitter about how collection (and now catalog) summaries are handled with stac_extensions, and how item_assets may play into this as well. If a Collection/Catalog is supposed to extend for example eo if summary information contains eo fields, then I agree we need a way to enable it on Collections/Catalogs

@lossyrob
Copy link
Member

lossyrob commented May 4, 2021

As described in radiantearth/stac-spec#1120, both Collection and Catalogs need implementation for most extensions as the summary information can contain extension information. This issue is resolved when extensions are implemented for each of the object types that they apply. Related to #327

@lossyrob
Copy link
Member

lossyrob commented May 5, 2021

Note that Catalogs are now dropping summaries (radiantearth/stac-spec#1122), so this only needs to account for Collection extensions

@duckontheweb
Copy link
Contributor

@schwehr If you're game, this is something we would love to get into the 1.0 release. Any chance you'd have some availability to work on it in the next few weeks?

@schwehr
Copy link
Collaborator Author

schwehr commented May 20, 2021

I can try to give it a go next week. It would be nice to have.

@cholmes cholmes added this to the 1.0.0 milestone May 24, 2021
@duckontheweb duckontheweb modified the milestones: 1.0.0, 1.0.0-rc.1 May 24, 2021
@schwehr
Copy link
Collaborator Author

schwehr commented May 27, 2021

Starting to look at doing the Collection part. I'm totally not familiar with mixin stuff, but the pystac.Item Mixin seems wrong. I need to dig deeper into it to understand now ExtensionManagementMixin works

class EOExtension(
    Generic[T], PropertiesExtension, ExtensionManagementMixin[pystac.Item]
):

When the concrete classes have pystac.Item:

class ItemEOExtension(EOExtension[pystac.Item]):
class AssetEOExtension(EOExtension[pystac.Asset]):
class SummariesEOExtension(SummariesExtension):

@schwehr
Copy link
Collaborator Author

schwehr commented May 27, 2021

Ok... looking at datacube.py, I am starting to get it.

class EOExtension(
    Generic[T],
    PropertiesExtension,
    ExtensionManagementMixin[Union[pystac.Collection, pystac.Item]]
):

@duckontheweb
Copy link
Contributor

@schwehr I'm aiming to get an RC1 release out in the next couple of days and would love to include this. Does that seem feasible?

@schwehr
Copy link
Collaborator Author

schwehr commented Jun 16, 2021

@schwehr I'm aiming to get an RC1 release out in the next couple of days and would love to include this. Does that seem feasible?

I gave it an initial look and ended up with more questions than answers. Am about to be OOO on leave for a week or two

@duckontheweb
Copy link
Contributor

Okay, no worries. I'll take a crack at it and see how far I get.

@duckontheweb duckontheweb assigned duckontheweb and unassigned schwehr Jun 16, 2021
@duckontheweb
Copy link
Contributor

Moving this out of the RC1 release since it will represent a feature add rather than a breaking change.

@duckontheweb duckontheweb modified the milestones: 1.0.0-rc.1, 1.0.0 Jun 17, 2021
@duckontheweb
Copy link
Contributor

@lossyrob @schwehr I'm looking at this in more detail right now and I think I'm still confused about what exactly needs to be implemented. We have already implemented this extension for both Items and Assets, and we already have Collection-level summaries implemented. Is anything further needed?

@schwehr
Copy link
Collaborator Author

schwehr commented Jul 2, 2021

I'm confused too. I think we need someone to create a Collection example here: stac-extensions/eo#6

@duckontheweb duckontheweb modified the milestones: 1.0.0, 1.1.0 Jul 8, 2021
@duckontheweb duckontheweb modified the milestones: 1.1.0, 1.0.0 Jul 17, 2021
@duckontheweb
Copy link
Contributor

I'm confident that no change is needed for this issue. My understanding is that the scope of the Electro-Optical Extension includes Collection only because extension properties can be summarized at the Collection level. We have implemented this in PySTAC, so no further changes should be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants