bfastSpatial icon indicating copy to clipboard operation
bfastSpatial copied to clipboard

Different band numbers between LC8 and the other sensors

Open loicdtx opened this issue 11 years ago • 3 comments

Probably sr2vi.R or LandsatVIs.R need to be adapted accordingly

loicdtx avatar Jul 02 '14 08:07 loicdtx

@dutri001 I can take look into this issue if you haven't already done so (locally)

bendv avatar Jan 22 '16 18:01 bendv

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.

loicdtx avatar Jan 22 '16 18:01 loicdtx

Ok, I have a work-around for now @ 7b7529ac3cad4db72463d2f508db0b78243fc8f5, but I'll keep this issue open while I look into your suggested approach.

bendv avatar Jan 22 '16 22:01 bendv