Replies: 2 comments
-
@jessjaco, great question. The example of a QA band versus continuous spectral data is a perfect motivating example for this. In general, I'd say yes, there's interest in this. I'd be even more interested if there were some way stackstac could infer this automatically from the STAC metadata. If users had to pass a tuple or dict or something for I'm not sure what STAC metadata we'd use to determine this. https://github.com/stac-extensions/classification seems like an option, but I'm not sure how widely used it is. Anything else you can think of? As far as how to implement this, #202 is a good recent example of threading a little bit of STAC metadata all the way through to dataset-opening. I imagine a PR to do this for resampling would look very similar. |
Beta Was this translation helpful? Give feedback.
-
Yes, that all makes sense. I will think about the metadata pathway. The only thing is that there are often multiple resamplers that would be appropriate with continuous data. I often use nearest neighbor, but in this case I need something different. For reference, odc.stac.load does implement per-band resampling with a list or dict, though the documentation doesn't say how to use them (I learned that e.g. PS If you're wondering why I don't use odc.stac.load it's because stackstac error handling is more robust and I'm trying to decide which is easier to adapt. |
Beta Was this translation helpful? Give feedback.
-
I'm looking for a way to set resampling for specific assets / bands independently. I need this, for example, when dealing with Landsat data that has a categorical QA band (which I need to open with nearest resampling) and also some continuous spectral data that I would like to apply some smoothing to (e.g. bilinear resampling).
I took a cursory look through the code, and it seems like this would be fairly easy to implement, as asset_table_to_reader_and_window creates a reader for each asset anyway.
Is there any interest in this?
Beta Was this translation helpful? Give feedback.
All reactions