Skip to content

Commit 77380a0

Browse files
committed
Merge branch 'dev' of https://github.com/e-sensing/sits into feature/tmap-versions
2 parents 5e19427 + 3f2ca6c commit 77380a0

14 files changed

+127
-233
lines changed

DESCRIPTION

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Description: An end-to-end toolkit for land use and land cover classification
1818
using big Earth observation data, based on machine learning methods
1919
applied to satellite image data cubes, as described in Simoes et al (2021) <doi:10.3390/rs13132428>.
2020
Builds regular data cubes from collections in AWS, Microsoft Planetary Computer,
21-
Brazil Data Cube, and Digital Earth Africa using the Spatio-temporal Asset Catalog (STAC)
21+
Brazil Data Cube, Copernicus Data Space Environment (CDSE), Digital Earth Africa, Digital Earth Australia,
22+
NASA HLS using the Spatio-temporal Asset Catalog (STAC)
2223
protocol (<https://stacspec.org/>) and the 'gdalcubes' R package
2324
developed by Appel and Pebesma (2019) <doi:10.3390/data4030092>.
2425
Supports visualization methods for images and time series and
@@ -28,8 +29,7 @@ Description: An end-to-end toolkit for land use and land cover classification
2829
Provides machine learning methods including support vector machines,
2930
random forests, extreme gradient boosting, multi-layer perceptrons,
3031
temporal convolutional neural networks proposed by Pelletier et al (2019) <doi:10.3390/rs11050523>,
31-
residual networks by Fawaz et al (2019) <doi:10.1007/s10618-019-00619-1>, and temporal attention encoders
32-
by Garnot and Landrieu (2020) <doi:10.48550/arXiv.2007.00586>.
32+
and temporal attention encoders by Garnot and Landrieu (2020) <doi:10.48550/arXiv.2007.00586>.
3333
Supports GPU processing of deep learning models using torch <https://torch.mlverse.org/>.
3434
Performs efficient classification of big Earth observation data cubes and includes
3535
functions for post-classification smoothing based on Bayesian inference, and

NEWS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Support for ESA World Cover map
66
* Support for Digital Earth Australia products
77
* Support for Digital Earth Africa geomedian products
8+
* Support for PLANET Mosaic products
89
* Improve .netrc access to Harmonized Landsat-Sentinel cubes
910
* Use ROI to cut data cube after mosaic operation
1011
* Support for raster and vector classification using DEM as base cubes
@@ -19,7 +20,6 @@
1920
* Fix torch usage in Apple M3
2021
* Fix date parameter usage in `sits_view()`
2122
* Improve `plot()` performance using raster overviews
22-
* Include support for PLANET Mosaic product
2323

2424
### New features in SITS version 1.5.0
2525
* Support for SENTINEL-1-RTC and SENTINEL-2-L2A in CDSE

R/api_gdalcubes.R

+7-4
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@
459459
#' Use "D", "M" and "Y" for days, month and year.
460460
#' @param res Spatial resolution of the regularized images.
461461
#' @param roi A named \code{numeric} vector with a region of interest.
462+
#' @param tiles Tiles to be produced
462463
#' @param multicores Number of cores used for regularization.
463464
#' @param progress Show progress bar?
464465
#' @param ... Additional parameters for httr package.
@@ -468,6 +469,7 @@
468469
period,
469470
res,
470471
roi,
472+
tiles,
471473
output_dir,
472474
multicores = 1,
473475
progress = progress) {
@@ -481,15 +483,16 @@
481483
if (!dir.exists(temp_output_dir)) {
482484
dir.create(temp_output_dir, recursive = TRUE)
483485
}
486+
# timeline of intersection
487+
timeline <- .gc_get_valid_timeline(cube, period = period)
484488

485489
# filter only intersecting tiles
486490
if (.has(roi)) {
487491
cube <- .cube_filter_spatial(cube, roi = roi)
488492
}
489-
490-
# timeline of intersection
491-
timeline <- .gc_get_valid_timeline(cube, period = period)
492-
493+
if (.has(tiles)) {
494+
cube <- .cube_filter_tiles(cube, tiles = tiles)
495+
}
493496
# least_cc_first requires images ordered based on cloud cover
494497
cube <- .gc_arrange_images(
495498
cube = cube,

R/sits_cube.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@
217217
#' # --- Access to Digital Earth Australia
218218
#' cube_deaustralia <- sits_cube(
219219
#' source = "DEAUSTRALIA",
220-
#' collection = "GA_LS8C_NBART_GM_CYEAR_3",
221-
#' bands = c("BLUE", "GREEN", "RED", "NIR", "SWIR1"),
220+
#' collection = "GA_LS8CLS9C_GM_CYEAR_3",
221+
#' bands = c("RED", "GREEN", "BLUE"),
222222
#' roi = c(
223223
#' lon_min = 137.15991,
224224
#' lon_max = 138.18467,

R/sits_regularize.R

+10-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#' e.g., "P16D" for 16 days.
2626
#' @param res Spatial resolution of regularized images (in meters).
2727
#' @param roi A named \code{numeric} vector with a region of interest.
28-
#' @param tiles MGRS tiles to be produced (only for Sentinel-1 cubes)
28+
#' @param tiles Tiles to be produced.
2929
#' @param multicores Number of cores used for regularization;
3030
#' used for parallel processing of input (integer)
3131
#' @param output_dir Valid directory for storing regularized images.
@@ -114,15 +114,23 @@ sits_regularize.raster_cube <- function(cube, ...,
114114
res,
115115
output_dir,
116116
roi = NULL,
117+
tiles = NULL,
117118
multicores = 2L,
118119
progress = TRUE) {
119120
# Preconditions
120121
.check_raster_cube_files(cube)
122+
# check period
121123
.check_period(period)
124+
# check resolution
122125
.check_num_parameter(res, exclusive_min = 0)
126+
# check output_dir
123127
output_dir <- .file_path_expand(output_dir)
124128
.check_output_dir(output_dir)
129+
# check for ROI and tiles
130+
.check_roi_tiles(roi, tiles)
131+
# check multicores
125132
.check_num_parameter(multicores, min = 1, max = 2048)
133+
# check progress
126134
.check_progress(progress)
127135
# Does cube contain cloud band?
128136
if (!all(.cube_contains_cloud(cube)) && .check_warnings()) {
@@ -156,6 +164,7 @@ sits_regularize.raster_cube <- function(cube, ...,
156164
period = period,
157165
res = res,
158166
roi = roi,
167+
tiles = tiles,
159168
output_dir = output_dir,
160169
multicores = multicores,
161170
progress = progress

README.Rmd

+9-50
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,6 @@ gc_cube <- sits_regularize(
158158
```
159159
The above command builds a regular data cube with all bands interpolated to 60 m spatial resolution and 15-days temporal resolution. Regular data cubes are the input to the `sits` functions for time series retrieval, building machine learning models, and classification of raster images and time series.
160160

161-
The cube can be shown in a leaflet using `sits_view()`.
162-
```{r, echo=TRUE, eval=FALSE}
163-
# View a color composite on a leaflet
164-
sits_view(s2_cube[1, ], green = "B08", blue = "B03", red = "B11")
165-
```
166-
167-
168161
## Working with Time Series in `sits`
169162

170163
### Accessing Time Series in Data Cubes
@@ -293,42 +286,6 @@ Additionally, the sample quality control methods that use self-organized maps ar
293286

294287
- Lorena Santos, Karine Ferreira, Gilberto Camara, Michelle Picoli, Rolf Simoes, “Quality control and class noise reduction of satellite image time series”. ISPRS Journal of Photogrammetry and Remote Sensing, 177:75-88, 2021. <doi:10.1016/j.isprsjprs.2021.04.014>.
295288

296-
#### Papers that use sits to produce LUCC maps
297-
298-
- Rolf Simoes, Michelle Picoli, et al., "Land use and cover maps for Mato Grosso State in Brazil from 2001 to 2017". Sci Data 7(34), 2020. <doi:10.1038/s41597-020-0371-4>.
299-
300-
- Michelle Picoli, Gilberto Camara, et al., “Big Earth Observation Time Series Analysis for Monitoring Brazilian Agriculture”. ISPRS Journal of Photogrammetry and Remote Sensing, 2018. <doi:10.1016/j.isprsjprs.2018.08.007>.
301-
302-
- Karine Ferreira, Gilberto Queiroz et al., "Earth Observation Data Cubes for Brazil: Requirements, Methodology and Products". Remote Sens. 12:4033, 2020. <doi:10.3390/rs12244033>.
303-
304-
- Hadi, Firman, Laode Muhammad Sabri, Yudo Prasetyo, and Bambang Sudarsono. [Leveraging Time-Series Imageries and Open Source Tools for Enhanced Land Cover Classification](https://doi.org/10.1088/1755-1315/1276/1/012035). In IOP Conference Series: Earth and Environmental Science, 1276:012035. IOP Publishing, 2023.
305-
306-
- Bruno Adorno, Thales Körting, and Silvana Amaral, [Contribution of time-series data cubes to classify urban vegetation types by remote sensing](https://doi.org/10.1016/j.ufug.2022.127817). Urban Forest & Urban Greening, 79, 127817, 2023.
307-
308-
- Giuliani, Gregory. [Time-First Approach for Land Cover Mapping Using Big Earth Observation Data Time-Series in a Data Cube – a Case Study from the Lake Geneva Region (Switzerland)](https://doi.org/10.1080/20964471.2024.2323241). Big Earth Data, 2024.
309-
310-
- Werner, João, Mariana Belgiu et al., [Mapping Integrated Crop–Livestock Systems Using Fused Sentinel-2 and PlanetScope Time Series and Deep Learning](https://doi.org/10.3390/rs16081421). Remote Sensing 16, no. 8 (January 2024): 1421.
311-
312-
#### Papers that describe software used by the sits package
313-
314-
We thank the authors of these papers for making their code available to be used in connection with sits.
315-
316-
- Marius Appel and Edzer Pebesma, “On-Demand Processing of Data Cubes from Satellite Image Collections with the Gdalcubes Library.” Data 4 (3): 1–16, 2020. <doi:10.3390/data4030092>.
317-
318-
- Ron Wehrens and Johannes Kruisselbrink, "Flexible Self-Organising Maps in kohonen 3.0". Journal of Statistical Software, 87(7), 2018. <doi:10.18637/jss.v087.i07>.
319-
320-
- Charlotte Pelletier, Geoffrey I. Webb, and Francois Petitjean. “Temporal Convolutional Neural Network for the Classification of Satellite Image Time Series.” Remote Sensing 11 (5), 2019. <doi:10.3390/rs11050523>.
321-
322-
- Vivien Garnot, Loic Landrieu, Sebastien Giordano, and Nesrine Chehata, "Satellite Image Time Series Classification with Pixel-Set Encoders and Temporal Self-Attention", Conference on Computer Vision and Pattern Recognition, 2020. <doi: 10.1109/CVPR42600.2020.01234>.
323-
324-
- Vivien Garnot, Loic Landrieu, "Lightweight Temporal Self-Attention for Classifying Satellite Images Time Series", 2020. <arXiv:2007.00586>.
325-
326-
- Maja Schneider, Marco Körner, "[Re] Satellite Image Time Series Classification with Pixel-Set Encoders and Temporal Self-Attention." ReScience C 7 (2), 2021. <doi:10.5281/zenodo.4835356>.
327-
328-
- Jakub Nowosad, Tomasz Stepinski, "Extended SLIC superpixels algorithm for applications to non-imagery geospatial rasters". International Journal of Applied Earth Observation and Geoinformation, 112, 102935, 2022.
329-
330-
- Martin Tennekes, “tmap: Thematic Maps in R.” Journal of Statistical Software, 84(6), 1–39, 2018.
331-
332289
### Acknowledgements for community support
333290

334291
The authors are thankful for the contributions of Edzer Pebesma, Jakub Nowosad. Marius Appel, Martin Tennekes, Robert Hijmans, Ron Wehrens, and Tim Appelhans, respectively chief developers of the packages `sf`/`stars`, `supercells`, `gdalcubes`, `tmap`, `terra`, `kohonen`, and `leafem`. The `sits` package recognises the great work of the RStudio team, including the `tidyverse`. Many thanks to Daniel Falbel for his great work in the `torch` and `luz` packages. Charlotte Pelletier shared the python code that has been reused for the TempCNN machine learning model. We would like to thank Maja Schneider for sharing the python code that helped the implementation of the `sits_lighttae()` and `sits_tae()` model. We recognise the importance of the work by Chris Holmes and Mattias Mohr on the STAC specification and API.
@@ -337,19 +294,21 @@ The authors are thankful for the contributions of Edzer Pebesma, Jakub Nowosad.
337294

338295
We acknowledge and thank the project funders that provided financial and material support:
339296

340-
1. Amazon Fund, established by the Brazilian government with financial contribution from Norway, through the project contract between the Brazilian Development Bank (BNDES) and the Foundation for Science, Technology and Space Applications (FUNCATE), for the establishment of the Brazil Data Cube, process 17.2.0536.1.
297+
- Amazon Fund, established by the Brazilian government with financial contribution from Norway, through the project contract between the Brazilian Development Bank (BNDES) and the Foundation for Science, Technology and Space Applications (FUNCATE), for the establishment of the Brazil Data Cube, process 17.2.0536.1.
298+
299+
- Coordenação de Aperfeiçoamento de Pessoal de Nível Superior-Brasil (CAPES) and from the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq), for providing MSc and PhD scholarships.
341300

342-
2. Coordenação de Aperfeiçoamento de Pessoal de Nível Superior-Brasil (CAPES) and from the Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq), for providing MSc and PhD scholarships.
301+
- Sao Paulo Research Foundation (FAPESP) under eScience Program grant 2014/08398-6, for for providing MSc, PhD and post-doc scholarships, equipment, and travel support.
343302

344-
3. Sao Paulo Research Foundation (FAPESP) under eScience Program grant 2014/08398-6, for for providing MSc, PhD and post-doc scholarships, equipment, and travel support.
303+
- International Climate Initiative of the Germany Federal Ministry for the Environment, Nature Conservation, Building and Nuclear Safety (IKI) under grant 17-III-084- Global-A-RESTORE+ (“RESTORE+: Addressing Landscape Restoration on Degraded Land in Indonesia and Brazil”).
345304

346-
4. International Climate Initiative of the Germany Federal Ministry for the Environment, Nature Conservation, Building and Nuclear Safety (IKI) under grant 17-III-084- Global-A-RESTORE+ (“RESTORE+: Addressing Landscape Restoration on Degraded Land in Indonesia and Brazil”).
305+
- Microsoft Planetary Computer under the GEO-Microsoft Cloud Computer Grants Programme.
347306

348-
5. Microsoft Planetary Computer under the GEO-Microsoft Cloud Computer Grants Programme.
307+
- Instituto Clima e Sociedade, under the project grant "Modernization of PRODES and DETER Amazon monitoring systems".
349308

350-
6. The Open-Earth-Monitor Cyberinfratructure project, which has received funding from the European Union's Horizon Europe research and innovation programme under [grant agreement No. 101059548](https://cordis.europa.eu/project/id/101059548).
309+
- The Open-Earth-Monitor Cyberinfratructure project, which has received funding from the European Union's Horizon Europe research and innovation programme under [grant agreement No. 101059548](https://cordis.europa.eu/project/id/101059548).
351310

352-
7. [FAO-EOSTAT](https://www.fao.org/in-action/eostat) initiative, which uses next generation Earth observation tools to produce land cover and land use statistics.
311+
- [FAO-EOSTAT](https://www.fao.org/in-action/eostat) initiative, which uses next generation Earth observation tools to produce land cover and land use statistics.
353312

354313
### How to contribute
355314

0 commit comments

Comments
 (0)