
Rename assets to a common band schema.
stac_rename_assets.RdHarmonising collections that name the same physical band differently (e.g.
HLS Landsat B05 and HLS Sentinel-2 B8A are both the narrow NIR): supply a
c(old = new) map and the asset column is rewritten to the shared names.
Assets absent from the map are dropped by default, so the map doubles as the
band selector. Include identity entries (Fmask = "Fmask") to keep a band
under its own name.
Arguments
- sources
A
stac_sources()table.- mapping
Named character
c(old = new): original asset -> common name.- drop_unmapped
Drop assets not named in
mapping(defaultTRUE)? WhenFALSE, unmapped assets pass through unchanged.
Details
After renaming, stac_merge() concatenates the collections into one table.
A band a collection lacks needs no placeholder: lazy_dataset() gives each
band only the slices that carry it, and mask() pairs those slices with the
QA band by name (a Landsat-only thermal band masks against the Landsat Fmask
slices), so ragged bands reduce over exactly their own observations.