Different band numbers between LC8 and the other sensors
Probably sr2vi.R or LandsatVIs.R need to be adapted accordingly
@dutri001 I can take look into this issue if you haven't already done so (locally)
Yes, I have thought a lot about it but unfortunately haven't had much time to actually do it. My suggestion would be to go for a more object oriented approach for the pre-processing steps, otherwise things will get messy and will become hard to maintain and expend (e.g. to Landsat 8 and sentinel 2).
The class could look like that more or less:
setClass(Class = 'satellitepp',
representation(path = 'character',
vi = 'character',
sensorName = 'character',
viFunction = 'function', # The function to be passed to overlay
isCompressed = 'logical',
cloudMask = 'logical',
cloudMaskName = 'character'),
# And so on, you get the idea
validity = function(object) {
sensorName %in% c('LT4', 'LT5', 'LE7', 'LC8')
}
))
Then we need a bunch of methods to fill the slots (e.g. viFunction from sensorName and vi) and process the data.
Ok, I have a work-around for now @ 7b7529ac3cad4db72463d2f508db0b78243fc8f5, but I'll keep this issue open while I look into your suggested approach.