Open aTnT opened 5 years ago
Good idea, will do so as soon as I find time to continue with the prep
functions. Will include a function that binds to a present sen2cor installation.
FYI, i was able to run Sen2Cor with Docker (i have created my own Sen2Cor docker image) with the output of getSentinel_data()
and run prepSentinel()
. The output of running Sen2Cor on Sentinel-2 L1C imagery + running prepSentinel()
is equivalent to getting L2A imagery with getSentinel_data()
+ running `prepSentinel(). Note that L2A seems to be only available in the servers in Europe, so outside Europe one has to run Sen2Cor to generate L2A imagery. The steps i do to generate L2A imagery from L1C are:
getSentinel_data()
to download L1C imagery.SAFE
folder availableatavares\sen2cor
to convert L1C to L2A imagery. An example usage command is docker run --rm -ti -v {/host/machine/mapped/folder/where/the/.SAFE/folder/is/located}:/data atavares/sen2cor /data/{name_of_SAFE_folder.SAFE}
.SAFE
folderprepSentinel()
on the L2A .zip fileMaybe some improvements to add to prepSentinel()
are:
prepSentinel()
the band names get lost:band.order <- list("aux" = c("AOT", "CLD", "SCL", "TCI", "WVP", "SNW"), "refl" = c("B01", "B02", "B03", "B04", "B05", "B06", "B07", "B08", "B8A", "B09", "B10", "B11", "B12"))
SAFE = true
to avoid step 4 above (create a .zip file)In the sen2r package is a Sentinel-2 preprocessing function accessing the Sen2Cor software. It also installs the software if not yet on the machine.
Sen2Cor is a processor for Sentinel-2 Level 2A product generation and formatting; it performs the atmospheric-, terrain and cirrus correction of Top-Of- Atmosphere Level 1C input data. Sen2Cor creates Bottom-Of-Atmosphere, optionally terrain- and cirrus corrected reflectance images; additional, Aerosol Optical Thickness-, Water Vapor-, Scene Classification Maps and Quality Indicators for cloud and snow probabilities. Its output product format is equivalent to the Level 1C User Product: JPEG 2000 images, three different resolutions, 60, 20 and 10 m.
Sec2Cor ESA webpage: http://step.esa.int/main/third-party-plugins-2/sen2cor/
Sen2Cor on Docker: https://hub.docker.com/r/atavares/sen2cor/ https://bitbucket.org/atntavares/sen2cor/src/master/