-
Notifications
You must be signed in to change notification settings - Fork 7
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
How to keep scene classification layer when using get_sentinel2_imagery #71
Comments
Thanks! This will be fixed by #72 |
(or, to answer your actual question -- there isn't a better way yet, but soon in dev running |
This is now in c(rsi::sentinel2_band_mapping$planetary_computer_v1, scl = "scl")
#> An rsi band mapping object with attributes:
#> mask_band mask_function stac_source collection_name query_function class scl_name download_function sign_function names
#>
#> B01 B02 B03 B04 B05 B06 B07 B08 B8A B09 B11 B12 scl
#> "A" "B" "G" "R" "RE1" "RE2" "RE3" "N" "N2" "WV" "S1" "S2" "scl" Created on 2024-06-24 with reprex v2.1.0 If you don't name the additional assets, the asset name gets used as the output band name: identical(
c(rsi::sentinel2_band_mapping$planetary_computer_v1, scl = "scl"),
c(rsi::sentinel2_band_mapping$planetary_computer_v1, "scl")
)
#> [1] TRUE Created on 2024-06-24 with reprex v2.1.0 Thanks again for the report! |
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue. |
Hi!
This is a great library and has been extremely helpful to work with geospatial data. I was wondering if there was a good way to copy and adjust rsi band mapping objects?
For sentinel-2 data, I would like to preserve the "scl" band. In the rsi band mapping object
rsi::sentinel2_band_mapping$aws_v1
, the "scl" band is defined in the mask_band attribute, but it is not in the band mapping vector. I have a scenario where I do not want to apply the masking function in the get_sentinel2_imagery function, but I still want to save the "scl" band as an asset. Is it possible to do this?This is what the band mapping object currently looks like:
And this is what I want it to look like:
I cannot add another element to the band mapping object without it removing all of the other attributes (i.e. stac_source, collection_name, etc.). So right now, I'm using this workaround where I create a custom named vector and then manually define the parameters that would look normally be looking at the
asset_names
argument:I just wanted to see if there was a better way of adding the "scl" band as an asset at this time.
Thank you!
The text was updated successfully, but these errors were encountered: