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

Defining some asset fields in collections #153

Closed
matthewhanson opened this issue Aug 14, 2018 · 3 comments
Closed

Defining some asset fields in collections #153

matthewhanson opened this issue Aug 14, 2018 · 3 comments
Assignees
Labels
major This will take substantial work / thinking to do. stac-collection
Milestone

Comments

@matthewhanson
Copy link
Collaborator

One of the things we hard originally discussed was having an "available_assets" field. This is a useful field to define in collections, as it tells you what you can expect to find in a single member item.

There's nothing specifically that prevents this from being the case in the definition of collections, but it does make the logic of merging an item with it's collection level metadata more complex. If a collection defines some fields of an asset (the ones that are duplicated across all items such as key, file type, available keys, etc.) and the item defines just the actual URL of those items, then a client that merges them (such as sat-search ) needs to make sure it merges all of the available keys into the correct items.

For example, right now with assets as objects (may change, see #151) in the collection assets could be defined as just a dictionary of keys with empty values:

assets: {
'B1': {},
'B2': {},
'B3': {}
}

Which informs the user who is examining the collection that B1, B2, and B3 are available assets. Otherwise right now, such as in sat-api, you have to look at a specific item to even know what assets are available, and even in that case you are assuming that the one item is representative of all items in the collection, which is a bad assumption. Some items could define additional assets, but the collection should indicate which assets are available in all items.

cc @cholmes @mojodna @scisco

@mojodna
Copy link
Collaborator

mojodna commented Aug 15, 2018

This still seems achievable using the key or role attribute in place of object keys, indicating which are expected to have values associated.

@matthewhanson
Copy link
Collaborator Author

@mojodna Yes, it is achievable, but only if an id is constrained to be unique among all items in the list. But it also makes it very difficult to merge them as described in #151 whereas a recursive merge of dictionaries is straightforward.

@cholmes cholmes added this to the 0.6.0-RC1 milestone Aug 24, 2018
@cholmes cholmes modified the milestones: 0.6.0-RC1, 0.7.0 Oct 12, 2018
@cholmes
Copy link
Contributor

cholmes commented Oct 12, 2018

Moving this to 0.7.0, as getting this in is a top priority for that release, but won't happen here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major This will take substantial work / thinking to do. stac-collection
Projects
None yet
Development

No branches or pull requests

4 participants