9
9
<!-- badges: start -->
10
10
<!-- [](https://drone.dpi.inpe.br/e-sensing/sits) -->
11
11
12
+ [ ![ Status at rOpenSci Software Peer
13
+ Review] ( https://badges.ropensci.org/596_status.svg )] ( https://github.com/ropensci/software-review/issues/596 )
12
14
[ ![ CRAN
13
15
status] ( https://www.r-pkg.org/badges/version/sits )] ( https://cran.r-project.org/package=sits )
14
16
[ ![ R-check-dev] ( https://github.com/e-sensing/sits/actions/workflows/R-CMD-check.yaml/badge.svg )] ( https://github.com/e-sensing/sits/actions/workflows/R-CMD-check.yaml )
@@ -119,7 +121,7 @@ devtools::install_github("e-sensing/sits", dependencies = TRUE)
119
121
# load the sits library
120
122
library(sits )
121
123
# > SITS - satellite image time series analysis.
122
- # > Loaded sits v1.4.2-1 .
124
+ # > Loaded sits v1.5.0 .
123
125
# > See ?sits for help, citation("sits") for use in publication.
124
126
# > Documentation avaliable in https://e-sensing.github.io/sitsbook/.
125
127
```
@@ -137,8 +139,8 @@ more information on how to install the required drivers.
137
139
### Image Collections Accessible by ` sits `
138
140
139
141
Users create data cubes from analysis-ready data (ARD) image collections
140
- available in cloud services. The collections accessible in ` sits `
141
- 1.4.2.1 are:
142
+ available in cloud services. The collections accessible in ` sits ` 1.5.0
143
+ are:
142
144
143
145
1 . Brazil Data Cube
144
146
([ BDC] ( http://brazildatacube.org/en/home-page-2/#dataproducts ) ):
@@ -174,13 +176,13 @@ similar ways.
174
176
175
177
``` r
176
178
s2_cube <- sits_cube(
177
- source = " MPC" ,
178
- collection = " SENTINEL-2-L2A" ,
179
- tiles = c(" 20LKP" , " 20LLP" ),
180
- bands = c(" B03" , " B08" , " B11" , " SCL" ),
181
- start_date = as.Date(" 2018-07-01" ),
182
- end_date = as.Date(" 2019-06-30" ),
183
- progress = FALSE
179
+ source = " MPC" ,
180
+ collection = " SENTINEL-2-L2A" ,
181
+ tiles = c(" 20LKP" , " 20LLP" ),
182
+ bands = c(" B03" , " B08" , " B11" , " SCL" ),
183
+ start_date = as.Date(" 2018-07-01" ),
184
+ end_date = as.Date(" 2019-06-30" ),
185
+ progress = FALSE
184
186
)
185
187
```
186
188
@@ -208,11 +210,11 @@ Pebesma, 2019](https://www.mdpi.com/2306-5729/4/3/92).
208
210
209
211
``` r
210
212
gc_cube <- sits_regularize(
211
- cube = s2_cube ,
212
- output_dir = tempdir(),
213
- period = " P15D" ,
214
- res = 60 ,
215
- multicores = 4
213
+ cube = s2_cube ,
214
+ output_dir = tempdir(),
215
+ period = " P15D" ,
216
+ res = 60 ,
217
+ multicores = 4
216
218
)
217
219
```
218
220
@@ -247,16 +249,16 @@ library(sits)
247
249
data_dir <- system.file(" extdata/raster/mod13q1" , package = " sits" )
248
250
# create a cube from downloaded files
249
251
raster_cube <- sits_cube(
250
- source = " BDC" ,
251
- collection = " MOD13Q1-6" ,
252
- data_dir = data_dir ,
253
- delim = " _" ,
254
- parse_info = c(" X1" , " X2" , " tile" , " band" , " date" ),
255
- progress = FALSE
252
+ source = " BDC" ,
253
+ collection = " MOD13Q1-6" ,
254
+ data_dir = data_dir ,
255
+ delim = " _" ,
256
+ parse_info = c(" X1" , " X2" , " tile" , " band" , " date" ),
257
+ progress = FALSE
256
258
)
257
259
# obtain a set of samples defined by a CSV file
258
260
csv_file <- system.file(" extdata/samples/samples_sinop_crop.csv" ,
259
- package = " sits"
261
+ package = " sits"
260
262
)
261
263
# retrieve the time series associated with the samples from the data cube
262
264
points <- sits_get_data(raster_cube , samples = csv_file )
@@ -311,16 +313,16 @@ data("samples_modis_ndvi")
311
313
data(" point_mt_6bands" )
312
314
# Train a deep learning model
313
315
tempcnn_model <- sits_train(
314
- samples = samples_modis_ndvi ,
315
- ml_method = sits_tempcnn()
316
+ samples = samples_modis_ndvi ,
317
+ ml_method = sits_tempcnn()
316
318
)
317
319
# Select NDVI band of the point to be classified
318
320
# Classify using TempCNN model
319
321
# Plot the result
320
- point_mt_6bands | >
321
- sits_select(bands = " NDVI" ) | >
322
- sits_classify(tempcnn_model ) | >
323
- plot()
322
+ point_mt_6bands | >
323
+ sits_select(bands = " NDVI" ) | >
324
+ sits_classify(tempcnn_model ) | >
325
+ plot()
324
326
# > | | | 0% | |=================================== | 50% | |======================================================================| 100%
325
327
```
326
328
@@ -342,44 +344,36 @@ using `sits_view()`.
342
344
# Cube is composed of MOD13Q1 images from the Sinop region in Mato Grosso (Brazil)
343
345
data_dir <- system.file(" extdata/raster/mod13q1" , package = " sits" )
344
346
sinop <- sits_cube(
345
- source = " BDC" ,
346
- collection = " MOD13Q1-6" ,
347
- data_dir = data_dir ,
348
- delim = " _" ,
349
- parse_info = c(" X1" , " X2" , " tile" , " band" , " date" ),
350
- progress = FALSE
347
+ source = " BDC" ,
348
+ collection = " MOD13Q1-6" ,
349
+ data_dir = data_dir ,
350
+ delim = " _" ,
351
+ parse_info = c(" X1" , " X2" , " tile" , " band" , " date" ),
352
+ progress = FALSE
351
353
)
352
354
# Classify the raster cube, generating a probability file
353
355
# Filter the pixels in the cube to remove noise
354
356
probs_cube <- sits_classify(
355
- data = sinop ,
356
- ml_model = tempcnn_model ,
357
- output_dir = tempdir()
357
+ data = sinop ,
358
+ ml_model = tempcnn_model ,
359
+ output_dir = tempdir()
358
360
)
359
361
# > | | | 0% | |======================================================================| 100%
360
362
# apply a bayesian smoothing to remove outliers
361
363
bayes_cube <- sits_smooth(
362
- cube = probs_cube ,
363
- output_dir = tempdir()
364
+ cube = probs_cube ,
365
+ output_dir = tempdir()
364
366
)
365
367
# generate a thematic map
366
368
label_cube <- sits_label_classification(
367
- cube = bayes_cube ,
368
- output_dir = tempdir()
369
+ cube = bayes_cube ,
370
+ output_dir = tempdir()
369
371
)
370
372
# > | | | 0% | |======================================================================| 100%
371
373
# plot the the labelled cube
372
374
plot(label_cube ,
373
- title = " Land use and Land cover in Sinop, MT, Brazil in 2018"
375
+ title = " Land use and Land cover in Sinop, MT, Brazil in 2018"
374
376
)
375
- # > The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
376
- # > which was just loaded, will retire in October 2023.
377
- # > Please refer to R-spatial evolution reports for details, especially
378
- # > https://r-spatial.org/r/2023/05/15/evolution4.html.
379
- # > It may be desirable to make the sf package available;
380
- # > package maintainers should consider adding sf to Suggests:.
381
- # > The sp package is now running under evolution status 2
382
- # > (status 2 uses the sf package in place of rgdal)
383
377
```
384
378
385
379
<div class =" figure " style =" text-align : center " >
0 commit comments