Releases: ranghetti/sen2r
Version 0.3.2
This is an improvement of version 0.3.1, with several fixes and improvements.
New functions
-
check_sen2r_deps()
: a new GUI to help checking dependencies. -
Add function
s2_perc_masked()
to compute the percentage of cloud-masked surface.
GUI changes
-
Major GUI improvements in the definition of the extent: now the main map is used only to show the extent and the tiles, while the definition of the extent (drawn, specified with a bounding box or taken from a loaded polygon) is donee in separate maps (this allows to avoid many errors).
-
Add radiobutton for index datatype, to choose the datatype when an index is generated.
-
Add maximum cloud cover threshold.
-
Implement seasonal time period (#74).
-
Implement the download with aria2c.
Processing chain
-
Major commit: retrieve also existing filenames.
Before this commit, if some products were partially retrieved (e.g. output BOA) and some depending on them are missing (e.g. an index) but SAFE were not required, the corresponding expected vectors were not retrieved (missing SAFE tile names nothing was generated). Now, existing names matching the parameters are attached to each "_exp" vector. -
Manage parallelisation:
- add partial parallelisation in s2_calcindices() (on infiles, not on indices);
- add "parallel" argument in sen2r() to allow singlecore mode;
- fix parallel=FALSE in function (force n_cores=1).
In general, now the whole processing chain can be optionally launched in single core.
Addition to existing functions
-
Improvement in integer / byte data types for generation of indices:
Int16 is now the default data type; chosing an integer data type the output values are clipped on the valid format range, and the scaling factor can be chosen by the user; chosing Byte, interval -1 to 1 is coherced to 0-200 (with nodata=255). -
Use standard nodata values to compute indices.
-
Return the list of created files after processing.
-
Accept custom mask combinations:
now it is possible to define masks with a custom combination of SCL classes to be masked. -
Allow argument "timewindow" in
sen2r()
to be a single integer value, which is interpreted as the period between today and n days ago. -
Uniform temporary directories (#73).
Now the principal functions have the parameters tmpdir and rmtmp to set the temporary directory and the choice to delete /not to delete temporary files. Only two exceptions: create_indices_db() uses a fixed temporary directory (since it is a function intended not to be run by endusers); sen2cor() launched from sen2r() uses a default temporary directory if tempdir is in a SAMBA mountpoint over Windows.
Other changes
-
Update to sen2cor 2.5.5, and manage S2A L2A operational products (https://scihub.copernicus.eu/news/News00305).
-
Add a welcome message and a logo.
-
Change package name from SALTO to sen2r, and rename the main function consequently to
sen2r()
. -
Remove s2download as dependence (now it is integrated within the package).
-
Remove sprawl dependencies.
Major fixes
-
Avoid blurs and artifices in thumbnails.
stack2rgb() now works with GDAL routines; gdalwarp is used instead than gdal_translate for reducing the size of input images (to avoid averaging NA values, which produced blurs on borders of BOA thumbnails); intermediate GTiff files are used to bypass the presence of artifices in SCL PNG thumbnails and to produce JPEG multiband TOA/BOA thumbnails. -
Load python modules correctly.
Now on Windows all the modules are imported using import_from_path() in init_python(), which is called anywhere modules are needed. -
Fix unrecognised osgeo in Windows.
When running gdal_calc in Windows with multiple Python installlations, the wrong one (i.e. Anaconda) is used, and "no module names osgeo" error is returned. -
Other minor fixes.
Version 0.3.1
This is an improvement of version 0.3.1, with several fixes and secondary improvements:
Changes:
- Allows output directories to be created by fidolasen_s2 (#54)
- Convert NA arguments to NULL
- Add check that the mask polygons are not empty
- Add parameter extent_name (#58)
- Add exception for Hub unavailable
- Add support for multiple tiles and extent names
- Allow to generate thumbnails also on maps with wrong naming convention …
- Allow to generate thumbnails also on maps with wrong naming convention …
- Add "tiles" argument to consider only specified tiles
- Add the possibility to download products over Windows (#49)
- Add extent_name in the GUI (#58)
- Add automatic installation of wget on Windows
- Add support for TCI thumbnail
Some fixes:
- Fix recognising gdalUtils after R restarts
- Fix error applying sen2cor on oldname SAFE
- Delete also L1C product when applying sen2cor on a copy of the SAFE
- Fix to recognise all SAFE paths
- Do not ask for overwriting dependences in non interactive mode
- Fix the check on dstnodata length
- Fix the number of polygons required to mask
- Combine multiple features in mask / extent
- Accept non-sf extents or sf with NAs within fields
- Change TCI mask values (use 0 instead of NA in order not to create problems with 8-bit format)
- Various fixes (see solved issues)
Version 0.3.0
This version allows to perform all basic operations with Sentinel-2 data: finding and downloading the required tiles (on Linux), correcting them with sen2cor, processing them (merging adiacent tiles, clipping, reprojecting, rescaling, applying atmospheric mask) to create output multiband files (in a format managed by GDAL) and spectral indices.
The version follows the issued scheduled for milestone 0.3.0; future improvements with Sentinel-2 data are scheduled for release 0.4.0.
Version 0.2.0
This is an intermediate version, which does not allow yet to perform a complete workflow, but it allows to manually find (s2_list.R
), download (s2_download.R
), correct (s2_sen2cor.R
), translate in a format managed by GDAL (s2_translate.R
) and merge by orbit number (s2_merge.R
) Sentinel-2 data.
An example of possible manual workflow is shown in the temporary script tutorial.R
.
For a complete automatic workflow on Sentinel-2 data, wait version 0.3.0.