Add 'bands' as an alternative to 'bidx' and update documentation - #31
emmanuelmathot wants to merge 4 commits into
Conversation
…' in documentation
m-mohr
left a comment
There was a problem hiding this comment.
I'm not a fan of naming it bands with a definition that conflicts the definition of the bands construct. All my tooling at least assumes that if you find bands it has the definition of the bands construct as it's in common metadata.
|
I would still use bidx or indexes to differentiate with the stac band concept |
Where does it conflict with the STAC spec? |
|
because I think a
Only the |
|
just a side note, the more we add specification within the renders the more conflicts we can have. We should also mention the links with the asset or assets array (would a band be applied to all the assets or the band array should match the length of the asset arrays? E.g, in titiler we moved from |
Here, bands is an array of strings. In STAC spec it's an array of (Band) objects. |
Yes, the string is a reference to the band name. THe intent is not to specify the band again, just to select them. |
|
Yeah, but it's not compliant to the common metadata model. We should choose a different name, otherwise tooling will be confused when it implement's this as it expects an object, not a string. Also just as a clarification: #18 just asked for a clarification, not a new construct. I'm fine with bidx as long as it's well documented. Additional thought: name is not required in bands. |
|
Good points. I think this converges if we fold the fix back into @vincentsarago you're right that we still need a way to select bands independently per asset and that's already what the array-of-arrays shape in this PR is for (one inner array per position in @m-mohr agreed. I always forgot that common metadata applies to all objects. So: drop "assets": ["B04", "stacked"],
"bidx": [[], [3, "nir"]]@m-mohr #18 only asked for bidx to be documented but the minimal addition needed to make a documented answer possible (1-based, per-asset, name-or-index). Let me know if that lines up with what you had in mind. |
… name-based selector for bands
# Conflicts: # CHANGELOG.md # README.md
|
Fine for me. Makes it obviously a bit more difficult to implement. 1-based index will likely lead to some bugs when people don't realize it, but as long as it's documented fine for me. Note that as-is, it's a breaking change. The array structure changed from array of integers to array of array of integers or strings. The old way (array of integers) is not supported via the schema and README any longer, but I think that is fine and makes it less prone to error. |
Introduce 'bands' as a name-based alternative to 'bidx', deprecating the latter. Update documentation, including CHANGELOG, README, and JSON schema, to reflect this change and provide a new Planet example demonstrating the use of 'bands'.
Fixes #18