Skip to content
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

Add "inheritence" #1239

Open
gadomski opened this issue Sep 27, 2023 · 2 comments
Open

Add "inheritence" #1239

gadomski opened this issue Sep 27, 2023 · 2 comments
Milestone

Comments

@gadomski
Copy link
Member

In STAC 1.1, we are probably going to explicitly state that assets "inherit" attributes from items. E.g., for this (shortened) item:

{
  "properties": {"foo": "bar"},
  "assets": {"data": {"href": "example.tif"}}
}

pystac should behave like this:

assert item.assets["data"].foo == "bar"

This might require some strange __getattr__ magic, which might be really hard to do while preserving typing.

Related issues

@jsignell
Copy link
Member

Items don't have this kind of arbitrary get logic though right? So it might be that we add a bunch of new properties to the Asset class.

@gadomski
Copy link
Member Author

So it might be that we add a bunch of new properties to the Asset class.

Yup, agreed ... and, as I was thinking about it this morning, maybe Band as well -- I think the way the bands RFC works, an attribute could be defined on a band, on an asset, or on an item?

@jsignell jsignell added this to the STAC spec version 1.1.0 milestone Jul 31, 2024
@gadomski gadomski modified the milestones: STAC spec version 1.1.0, 2.0 Aug 9, 2024
@gadomski gadomski modified the milestones: STAC spec version 1.1.0, v2.0 Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants