-
Notifications
You must be signed in to change notification settings - Fork 180
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
Determining "primary" asset #308
Comments
In the case of datasets with bands split into individual files (Landsat 8), multiple assets may be "primary". |
What I don't really get: Is primary just a special thumbnail or could it also be used for other purposes? I'm wondering whether we could come up with a more intelligent way of determining the "primary" asset. We would need it anyway for cases without a primary in the assets - or should primary be required? Not sure whether there is always a primary asset though. I am also wondering how we would name the keys for multiple thumbnails. |
"primary" would be the primary dataset(s) (not thumbnail) associated with an "analytic" would be another |
I definitely see a need for this. I see it as a 'hint' that a data provider gives to help clients determine what to 'display'. It is more than just a thumbnail, ideally it's the full Cloud Optimized GeoTIFF that can be fully browsed. Indeed having STAC refer to COG's to me is one of the most compelling features, as data can be used right there. But you may have an Unusable Data Mask and a 4-band analytic product both as COG's, and you need a way to hint which should be used in a COG slippy map. So I wouldn't see primary as being required, indeed Items with just one asset wouldn't really need it. I've also wondered about making the dictionary names useful - like defining some common ones. But I agree we need to have a fuller discussion for 0.7.0 on asset definitions in general, and keep this bit in mind as something we need to do. @mojodna - I do think we can experiment with this with STAC browser and a couple of the repositories to show how it would work. |
It's certainly a valid use case, but I think you're on the right track that 'primary' isn't the right term here. A 'primary' asset completely depends on the use case, and it's really a vague term. 'visual', 'true-color', 'rgb' are all terms that I think more accurately describes this. You are looking for which asset or assets are needed to display as a byte-scaled 3 color image. This very much fits in with the asset definition talk. Perhaps part of the asset definition is specifying certain combinations of assets that give a desired set of data:
In the first use case it tells me that assets with those keys form a 3 band color image, in that order. In the second use case it tells me that assets with those keys are part of a 3d raster set of data, and it excludes asset keys that represent non-raster sources of data, or QA bands. In the third use case it tells me which assets are used for quality information. In reality, the situation is even more complicated than this. In fact, I could have the same assets be used for a visual usecase, as for an ARD use case, but supplying different scales and offsets to the data. Which is why...we need to discuss this with asset definitions. |
See #316 for proposed changes. (Agreed that "primary" isn't the right term.) I also want to reiterate that I anticipate multiple asset types serving a single role being a relatively common occurrence. DG scenes are another example of this where multiple images are "visual" and need to be combined / displayed together to show the full extent of the item. |
Since multiple assets serve a single role, the order of those need to be captured somewhere. It is not good enough to just state that 3 bands are used to make a visual image. |
They don't necessarily need to be ordered; the DG images don't overlap (and are each 3 band), so they can be rendered in any order. Moving |
In Earth Engine, we sort of denote the primary "assets" when we specify the preferred visualization for rasters. In most cases this is just the list of bands, plus maybe gain/bias or min/max, plus maybe a palette. Also a lat/lon/zoom with an interesting viewport. This is done at the collection level - we don't have cases where different items in a collection need different primary assets. |
I also wondered this morning where/how we could place a collection level thumbnail. |
Rebooting this conversation in light of the new asset-level "role" attribute. Here's an example of how I'd see this working, with roles "overview", "thumbnail", "analytic", and "visual". (open question - should roles be an array rather than a string?) I feel a key part here is that I should be able to find assets by their description, without needing to know the implementation-specific, arbitrary object keys that have been assigned to them. I think of it it like a decision tree, that I might first look for all the assets with "eo:common_name == green", then select by "role == analysis" (not visual), then select by "gsd == 10" (not 60), then by media type "type == image/jp2" (not cog).
|
Yes, maybe it should. Similarly to the roles for the providers. |
Should be solved with #651 |
When consuming a STAC
Item
without detailed knowledge of vendor-specific properties or filename conventions, I'd like to know which asset should be treated as the "primary" one.Specifically, when pointing STAC Browser at a catalog, I'd like to make an informed choice about which asset to provide an interactive preview for. Since
assets
is an object, there's no "first" item to use as a default.We have the
thumbnail
key (which should also berel=thumbnail
?). Should we also introduce aprimary
key (andrel
) for this purpose?(Additional keys /
rel
s are already relegated to extension / vendor-specific use, which should handle use-cases like "analytic")The text was updated successfully, but these errors were encountered: