Skip to content

Commit

Permalink
v. 1.3.2 (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranghetti authored Feb 27, 2020
1 parent 4ae7cec commit 088af4e
Show file tree
Hide file tree
Showing 92 changed files with 362 additions and 595 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
^LICENSE\.md$
^cran\-comments\.md$
^CRAN-RELEASE$
^doc$
^Meta$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ vignettes/*.pdf
*.knit.md
.Rproj.user
*.Rproj
doc
Meta
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: sen2r
Type: Package
Title: Find, Download and Process Sentinel-2 Data
Version: 1.3.1.9004
Version: 1.3.2
Authors@R: c(person("Luigi", "Ranghetti",
email = "[email protected]",
role = c("aut", "cre"),
Expand Down
24 changes: 23 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# Version 1.3.2

## New features
* Add argument `req_res` to `safe_isvalid()` and `rm_invalid_safe()`: now the presence of the JP2 images required by the processing chain is checked by default. L2A products without all the three resolutions will not be used.
* Add output field `"res"` to the default `safe_getMetadata()` output, with the list of the available resolutions ("`all`" is returned in case of L1C products).

## New function arguments
* Add argument `timeout` to `sen2cor()` to limit the maximum Sen2cor execution time (after that time, Sen2Cor is stopped). This is useful to avoid blocking processing chains due to internal Sen2Cor errors.

## Dependencies
* Add new suggested dependency **`sys`** (it is used to call Sen2Cor using `sys::exec_wait()` instead than `system()`, allowing exporting Sen2Cor output to log files).
* Add new suggested dependency **`rgdal`** (since it is implicitly called by internal functions), as requested by CRAN policy.
* Move **`units`** and **`tools`** to suggested dependencies.
* Prepare to move **`shiny*`** and **`leaflet*`** dependencies to suggested (this will be done in a future release).

## Minor changes
* Allow choosing if ordering SAFE products from `dhus` or `apihub` (experimental).
* Replace all `GET()` calls with `RETRY()`, so to avoid errors in case of temporary unavailability of services.
* Allow Sen2Cor running with oldname SAFE (although the usage of these products is generally deprecated).
* Bug fixes (#272, #276).


# Version 1.3.1

## Major changes
Expand Down Expand Up @@ -35,7 +57,7 @@
- Internal function `sen2r_process_report()` to manage processing reports returned by `sen2r()`.

## Deprecated functions
- Internal function `init_python()` was deprecated (Python is no longer managed by **reticulate**).
- Internal function `init_python()` was deprecated (Python is no longer managed by **`reticulate`**).

## Changes in default argument values
- New argument `bigtiff` for BigTIFF management in functions `s2_translate()`, `s2_merge()`, `s2_mask()`, `s2_rgb()` and `s2_calcindices()`.
Expand Down
27 changes: 10 additions & 17 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@ For detailed instructions about using it, see the page ["Run in a Docker contain

The simplest way to use
<span style="color:#5793dd;vertical-align:top;font-size:90%;font-weight:normal;">sen</span><span style="color:#6a7077;vertical-align:baseline;font-size:115%;font-weight:bolder;">2</span><span style="color:#2f66d5;vertical-align:baseline;font-size:90%;font-weight:bold;">r</span>
is to execute it in interactive mode:
is to execute it in interactive mode (see [this vignette](http://sen2r.ranghetti.info/articles/sen2r_gui.html)):
```{r, eval = FALSE}
library(sen2r)
sen2r()
```
this opens a GUI which allows to set the required processing parameters,
and then launches the main function.

<p style="text-align:center;">
<a href="https://raw.githubusercontent.com/ranghetti/sen2r/devel/man/figures/sen2r_gui_sheet1.png" target="_blank">
Expand All @@ -124,32 +122,28 @@ Alternatively,
can be launched with a list of parameters (created with
[`s2_gui()`](http://sen2r.ranghetti.info/reference/s2_gui.html))
or passing manually the parameters as arguments of the function
(see [the documentation of the function](http://sen2r.ranghetti.info/reference/sen2r.html) for further details).
(see [this vignette](http://sen2r.ranghetti.info/articles/sen2r_cmd.html) for further details).

Other specific functions can be used to run single steps separately:
Other specific functions can be used to run single steps separately.
This is a list of the principal processing functions
(the complete list can be found in the Reference page):

* [`s2_list()`](http://sen2r.ranghetti.info/reference/s2_list.html)
to retrieve the list of available Sentinel-2 products based on input parameters;
* [`s2_download()`](http://sen2r.ranghetti.info/reference/s2_download.html)
to download Sentinel-2 products;
* [`s2_order()`](http://sen2r.ranghetti.info/reference/s2_order.html)
to order products from the Long Term Archive;
* [`sen2cor()`](reference/sen2cor.html)
to correct level-1C products using [Sen2Cor](http://step.esa.int/main/third-party-plugins-2/sen2cor);
* [`s2_translate()`](http://sen2r.ranghetti.info/reference/s2_translate.html)
to convert Sentinel-2 products from SAFE format to a format managed by GDAL;
* [`s2_merge()`](http://sen2r.ranghetti.info/reference/s2_merge.html)
to merge Sentinel-2 tiles which have the same date and orbit;
* [`gdal_warp()`](http://sen2r.ranghetti.info/reference/gdal_warp.html)
to clip, reproject and warp raster files (this is a wrapper to call
[gdal_translate](http://www.gdal.org/gdal_translate.html) or
[gdalwarp](http://www.gdal.org/gdalwarp.html) based on input parameters);
* [`s2_mask()`](http://sen2r.ranghetti.info/reference/s2_mask.html)
to apply a cloud mask to Sentinel-2 products;
* [`s2_rgb()`](http://sen2r.ranghetti.info/reference/s2_rgb.html)
to generate RGB images from Sentinel-2 Surface Reflectance multiband raster files;
* [`s2_calcindices()`](http://sen2r.ranghetti.info/reference/s2_calcindices.html)
to compute maps of spectral indices from Sentinel-2 Surface Reflectance multiband raster files;
* [`s2_thumbnails()`](http://sen2r.ranghetti.info/reference/s2_thumbnails.html)
to generate RGB thumbnails (JPEG or PNG) of the products.
to compute maps of spectral indices from Sentinel-2 Surface Reflectance multiband raster files.

Output products follow a specific naming convention (see [here](http://sen2r.ranghetti.info/articles/outstructure.html) for details).

## Credits

Expand Down Expand Up @@ -186,4 +180,3 @@ By participating in this project you agree to abide by its terms.
Users are encouraged to use GitHub issues in case of errors with the package.
Before opening a new issue, please read
<a href="https://github.com/ranghetti/sen2r/issues/186" target="_blank">these notes</a>.

48 changes: 19 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,14 @@ container”](http://sen2r.ranghetti.info/articles/docker.html) page.

The simplest way to use
<span style="color:#5793dd;vertical-align:top;font-size:90%;font-weight:normal;">sen</span><span style="color:#6a7077;vertical-align:baseline;font-size:115%;font-weight:bolder;">2</span><span style="color:#2f66d5;vertical-align:baseline;font-size:90%;font-weight:bold;">r</span>
is to execute it in interactive mode:
is to execute it in interactive mode (see [this
vignette](http://sen2r.ranghetti.info/articles/sen2r_gui.html)):

``` r
library(sen2r)
sen2r()
```

this opens a GUI which allows to set the required processing parameters,
and then launches the main
function.

<p style="text-align:center;">

<a href="https://raw.githubusercontent.com/ranghetti/sen2r/devel/man/figures/sen2r_gui_sheet1.png" target="_blank">
Expand All @@ -127,32 +124,24 @@ Alternatively,
[`sen2r()`](http://sen2r.ranghetti.info/reference/sen2r.html) can be
launched with a list of parameters (created with
[`s2_gui()`](http://sen2r.ranghetti.info/reference/s2_gui.html)) or
passing manually the parameters as arguments of the function (see [the
documentation of the
function](http://sen2r.ranghetti.info/reference/sen2r.html) for further
details).
passing manually the parameters as arguments of the function (see [this
vignette](http://sen2r.ranghetti.info/articles/sen2r_cmd.html) for
further details).

Other specific functions can be used to run single steps separately:
Other specific functions can be used to run single steps separately.
This is a list of the principal processing functions (the complete list
can be found in the Reference page):

- [`s2_list()`](http://sen2r.ranghetti.info/reference/s2_list.html) to
retrieve the list of available Sentinel-2 products based on input
parameters;
- [`s2_download()`](http://sen2r.ranghetti.info/reference/s2_download.html)
to download Sentinel-2 products;
- [`s2_order()`](http://sen2r.ranghetti.info/reference/s2_order.html)
to order products from the Long Term Archive;
- [`sen2cor()`](reference/sen2cor.html) to correct level-1C products
using
[Sen2Cor](http://step.esa.int/main/third-party-plugins-2/sen2cor);
- [`s2_translate()`](http://sen2r.ranghetti.info/reference/s2_translate.html)
to convert Sentinel-2 products from SAFE format to a format managed
by GDAL;
- [`s2_merge()`](http://sen2r.ranghetti.info/reference/s2_merge.html)
to merge Sentinel-2 tiles which have the same date and
orbit;
- [`gdal_warp()`](http://sen2r.ranghetti.info/reference/gdal_warp.html)
to clip, reproject and warp raster files (this is a wrapper to call
[gdal\_translate](http://www.gdal.org/gdal_translate.html) or
[gdalwarp](http://www.gdal.org/gdalwarp.html) based on input
parameters);
- [`s2_mask()`](http://sen2r.ranghetti.info/reference/s2_mask.html) to
apply a cloud mask to Sentinel-2 products;
- [`s2_rgb()`](http://sen2r.ranghetti.info/reference/s2_rgb.html) to
Expand All @@ -161,10 +150,11 @@ Other specific functions can be used to run single steps separately:
files;
- [`s2_calcindices()`](http://sen2r.ranghetti.info/reference/s2_calcindices.html)
to compute maps of spectral indices from Sentinel-2 Surface
Reflectance multiband raster
files;
- [`s2_thumbnails()`](http://sen2r.ranghetti.info/reference/s2_thumbnails.html)
to generate RGB thumbnails (JPEG or PNG) of the products.
Reflectance multiband raster files.

Output products follow a specific naming convention (see
[here](http://sen2r.ranghetti.info/articles/outstructure.html) for
details).

## Credits

Expand All @@ -186,17 +176,17 @@ International license](https://creativecommons.org/licenses/by-sa/4.0)

To cite this library, please use the following entry:

Ranghetti, L. and Busetto, L. (2019). *sen2r: Find, Download and Process
Sentinel-2 Data*. R package version 1.2.0. DOI:
Ranghetti, L. and Busetto, L. (2020). *sen2r: Find, Download and Process
Sentinel-2 Data*. R package version 1.3.2. DOI:
[10.5281/zenodo.1240384](https://dx.doi.org/10.5281/zenodo.1240384).
URL: <http://sen2r.ranghetti.info>.

``` bibtex
@Manual{sen2r,
title = {sen2r: Find, Download and Process Sentinel-2 Data},
author = {Luigi Ranghetti and Lorenzo Busetto},
year = {2019},
note = {R package version 1.2.0},
year = {2020},
note = {R package version 1.3.2},
doi = {10.5281/zenodo.1240384},
url = {http://sen2r.ranghetti.info},
}
Expand Down
19 changes: 8 additions & 11 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sen2r v. 1.3.1
# sen2r v. 1.3.2

## Test environments
* [local installation] Ubuntu 18.04, 64 bit, R 3.6.2
Expand All @@ -10,15 +10,12 @@
* [R-hub] macOS 10.11 El Capitan, R-release (experimental)

## R CMD check results
There were no ERRORs or WARNINGs.
There were no ERRORs, WARNINGs or NOTEs on all the tested platforms,
with the exception of win-builder oldrelease,
which returned the following warning:

There was 1 NOTE:
Days since last update: 3
Found the following significant warnings:
Warning: namespace 'rgdal' is not available and has been replaced

In the previous version 1.3.0 a bug was discovered:
in case the environmental variables PYTHONHOME and PYTHONPATH were not
previously set, Python-based utilities called by the package crash.
The bug interests portions of code which are commonly called by users,
and it can affect a large part of Windows users:
this is the reason why releasing this new version 1.3.1,
which corrects this bug, is so urgent.
This warning is quite strange, being rgdal a well-known R package working also
on R 3.5.2, for which binaries for r-oldrel are available and updated.
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/CODE-OF-CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/docker.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/articles/installation.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/outstructure.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/sen2r_cmd.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/sen2r_gui.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 088af4e

Please sign in to comment.