Skip to content

Commit

Permalink
Merge pull request #541 from rolfsimoes/feature/apply
Browse files Browse the repository at this point in the history
Feature/apply
  • Loading branch information
gilbertocamara authored Jan 13, 2022
2 parents 38ca8b0 + 802a530 commit f0879bd
Show file tree
Hide file tree
Showing 207 changed files with 6,946 additions and 4,744 deletions.
16 changes: 8 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sits
Type: Package
Version: 0.15.1-1
Version: 0.16.0
Title: Satellite Image Time Series Analysis for Remote Sensing Data Cubes
Authors@R: c(person('Rolf', 'Simoes', role = c('aut'), email = 'rolf.simoes@inpe.br'),
person('Gilberto', 'Camara', role = c('aut', 'cre'), email = 'gilberto.camara@inpe.br'),
Expand Down Expand Up @@ -35,14 +35,15 @@ Imports:
data.table (>= 1.13),
dplyr (>= 1.0.0),
gdalUtilities,
geojsonsf,
grDevices,
ggplot2,
graphics,
jsonlite,
knitr,
lubridate (>= 1.7.0),
parallel,
purrr (>= 0.3.0),
raster (>= 3.4),
Rcpp (>= 1.0.7),
rstac (>= 0.9.1-5),
sf (>= 0.9),
Expand All @@ -68,6 +69,7 @@ Suggests:
nnet,
openxlsx,
randomForest,
raster (>= 3.4),
RcppArmadillo,
Rwtss (>= 0.9.1),
scales,
Expand All @@ -77,7 +79,7 @@ Suggests:
xgboost,
zoo
Config/testthat/edition: 3
Config/testthat/parallel: true
Config/testthat/parallel: false
Config/testthat/start-first: cube, wtss, raster, bdc, ml
LinkingTo:
Rcpp,
Expand All @@ -87,6 +89,7 @@ Collate:
'RcppExports.R'
'data.R'
'sits-package.R'
'sits_apply.R'
'sits_accuracy.R'
'sits_bands.R'
'sits_bbox.R'
Expand All @@ -103,24 +106,21 @@ Collate:
'sits_distances.R'
'sits_dt_reference.R'
'sits_factory.R'
'sits_file_info.R'
'sits_filters.R'
'sits_gdalcubes.R'
'sits_get_data.R'
'sits_imputation.R'
'sits_keras.R'
'sits_labels.R'
'sits_label_classification.R'
'sits_machine_learning.R'
'sits_merge.R'
'sits_mlp.R'
'sits_ops_bands.R'
'sits_parallel.R'
'sits_patterns.R'
'sits_pipe.R'
'sits_plot.R'
'sits_processing_estimate.R'
'sits_raster_api.R'
'sits_raster_api_raster.R'
'sits_raster_api_terra.R'
'sits_raster_blocks.R'
'sits_raster_data.R'
Expand All @@ -130,7 +130,6 @@ Collate:
'sits_roi.R'
'sits_satveg.R'
'sits_select.R'
'sits_signal.R'
'sits_shp.R'
'sits_smooth.R'
'sits_smooth_aux_functions.R'
Expand All @@ -151,6 +150,7 @@ Collate:
'sits_tibble.R'
'sits_timeline.R'
'sits_twdtw.R'
'sits_uncertainty.R'
'sits_validate.R'
'sits_view.R'
'sits_values.R'
Expand Down
84 changes: 27 additions & 57 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,107 +2,71 @@

S3method("sits_labels<-",probs_cube)
S3method("sits_labels<-",sits)
S3method(.raster_check_package,default)
S3method(.raster_check_package,raster)
S3method(.gc_arrange_images,default)
S3method(.gc_arrange_images,first)
S3method(.raster_check_package,terra)
S3method(.raster_crop,raster)
S3method(.raster_crop,terra)
S3method(.raster_crs,raster)
S3method(.raster_crs,terra)
S3method(.raster_data_type,raster)
S3method(.raster_data_type,terra)
S3method(.raster_extent,raster)
S3method(.raster_extent,terra)
S3method(.raster_extract,raster)
S3method(.raster_extract,terra)
S3method(.raster_focal,raster)
S3method(.raster_focal,terra)
S3method(.raster_freq,raster)
S3method(.raster_freq,terra)
S3method(.raster_get_values,raster)
S3method(.raster_get_values,terra)
S3method(.raster_ncols,raster)
S3method(.raster_ncols,terra)
S3method(.raster_new_rast,raster)
S3method(.raster_new_rast,terra)
S3method(.raster_nlayers,raster)
S3method(.raster_nlayers,terra)
S3method(.raster_nrows,raster)
S3method(.raster_nrows,terra)
S3method(.raster_open_rast,raster)
S3method(.raster_open_rast,terra)
S3method(.raster_open_stack,raster)
S3method(.raster_open_stack,terra)
S3method(.raster_rast,raster)
S3method(.raster_rast,terra)
S3method(.raster_read_rast,raster)
S3method(.raster_read_rast,terra)
S3method(.raster_read_stack,raster)
S3method(.raster_read_stack,terra)
S3method(.raster_resample_methods,raster)
S3method(.raster_resample_methods,terra)
S3method(.raster_set_values,raster)
S3method(.raster_set_values,terra)
S3method(.raster_write_rast,raster)
S3method(.raster_write_rast,terra)
S3method(.raster_xmax,raster)
S3method(.raster_xmax,terra)
S3method(.raster_xmin,raster)
S3method(.raster_xmin,terra)
S3method(.raster_xres,raster)
S3method(.raster_xres,terra)
S3method(.raster_ymax,raster)
S3method(.raster_ymax,terra)
S3method(.raster_ymin,raster)
S3method(.raster_ymin,terra)
S3method(.raster_yres,raster)
S3method(.raster_yres,terra)
S3method(.sits_parse_roi_cube,ll)
S3method(.sits_parse_roi_cube,sf)
S3method(.sits_parse_roi_cube,xy)
S3method(.sits_rename_bands,raster_cube)
S3method(.sits_rename_bands,sits)
S3method(.sits_roi_bbox,ll)
S3method(.sits_roi_bbox,sf)
S3method(.sits_roi_bbox,xy)
S3method(.source_collection_access_test,mspc_cube)
S3method(.source_collection_access_test,satveg_cube)
S3method(.source_collection_access_test,stac_cube)
S3method(.source_collection_access_test,usgs_cube)
S3method(.source_collection_access_test,wtss_cube)
S3method(.source_cube,satveg_cube)
S3method(.source_cube,stac_cube)
S3method(.source_cube,wtss_cube)
S3method(.source_item_get_bands,stac_cube)
S3method(.source_item_get_cloud_cover,stac_cube)
S3method(.source_item_get_date,stac_cube)
S3method(.source_item_get_hrefs,bdc_cube)
S3method(.source_item_get_hrefs,stac_cube)
S3method(.source_item_get_hrefs,usgs_cube)
S3method(.source_item_get_resolution,stac_cube)
S3method(.source_items_bands_select,stac_cube)
S3method(.source_items_cube,stac_cube)
S3method(.source_items_cube,wtss_cube)
S3method(.source_items_fileinfo,stac_cube)
S3method(.source_items_fileinfo,wtss_cube)
S3method(.source_items_fid,stac_cube)
S3method(.source_items_file_info,wtss_cube)
S3method(.source_items_new,"mspc_cube_landsat-8-c2-l2")
S3method(.source_items_new,"mspc_cube_sentinel-2-l2a")
S3method(.source_items_new,aws_cube)
S3method(.source_items_new,bdc_cube)
S3method(.source_items_new,deafrica_cube)
S3method(.source_items_new,usgs_cube)
S3method(.source_items_new,wtss_cube)
S3method(.source_items_tile_get_bbox,aws_cube)
S3method(.source_items_tile_get_bbox,stac_cube)
S3method(.source_items_tile_get_crs,"mspc_cube_landsat-8-c2-l2")
S3method(.source_items_tile_get_crs,"mspc_cube_sentinel-2-l2a")
S3method(.source_items_tile_get_crs,aws_cube)
S3method(.source_items_tile_get_crs,bdc_cube)
S3method(.source_items_tile_get_crs,deafrica_cube)
S3method(.source_items_tile_get_crs,usgs_cube)
S3method(.source_items_tile_get_name,"mspc_cube_sentinel-2-l2a")
S3method(.source_items_tile_get_name,bdc_cube)
S3method(.source_items_tile_get_name,deafrica_cube)
S3method(.source_items_tile_get_name,stac_cube)
S3method(.source_items_tiles_group,"mspc_cube_landsat-8-c2-l2")
S3method(.source_items_tiles_group,"mspc_cube_sentinel-2-l2a")
S3method(.source_items_tiles_group,aws_cube)
S3method(.source_items_tiles_group,bdc_cube)
S3method(.source_items_tiles_group,deafrica_cube)
S3method(.source_items_tiles_group,usgs_cube)
S3method(.source_items_tile,"mspc_cube_landsat-8-c2-l2")
S3method(.source_items_tile,"mspc_cube_sentinel-2-l2a")
S3method(.source_items_tile,aws_cube)
S3method(.source_items_tile,bdc_cube)
S3method(.source_items_tile,deafrica_cube)
S3method(.source_items_tile,usgs_cube)
S3method(plot,classified_image)
S3method(plot,keras_model)
S3method(plot,patterns)
Expand All @@ -112,10 +76,13 @@ S3method(plot,raster_cube)
S3method(plot,sits)
S3method(plot,som_evaluate_cluster)
S3method(plot,som_map)
S3method(plot,uncertainty_cube)
S3method(print,sits_area_assessment)
S3method(print,sits_assessment)
S3method(sits_accuracy,classified_image)
S3method(sits_accuracy,sits)
S3method(sits_apply,raster_cube)
S3method(sits_apply,sits)
S3method(sits_bands,patterns)
S3method(sits_bands,sits)
S3method(sits_bands,sits_cube)
Expand Down Expand Up @@ -143,8 +110,8 @@ S3method(sits_labels,sits)
S3method(sits_labels,sits_cube)
S3method(sits_labels,sits_model)
S3method(sits_labels_summary,sits)
S3method(sits_merge,raster_cube)
S3method(sits_merge,sits)
S3method(sits_merge,sits_cube)
S3method(sits_select,patterns)
S3method(sits_select,sits)
S3method(sits_select,sits_cube)
Expand All @@ -157,7 +124,9 @@ S3method(sits_timeline,raster_cube)
S3method(sits_timeline,satveg_cube)
S3method(sits_timeline,sits)
S3method(sits_timeline,sits_model)
S3method(sits_timeline,uncertainty_cube)
S3method(sits_timeline,wtss_cube)
S3method(sits_uncertainty,entropy)
S3method(sits_values,bands_cases_dates)
S3method(sits_values,bands_dates_cases)
S3method(sits_values,cases_dates_bands)
Expand All @@ -166,7 +135,8 @@ S3method(sits_view,raster_cube)
S3method(sits_view,sits)
export("%>%")
export("sits_labels<-")
export(.source_cube_local_cube)
export(.sits_parse_roi_cube)
export(.sits_roi_sf_to_geojson)
export(sits_ResNet)
export(sits_TempCNN)
export(sits_accuracy)
Expand All @@ -186,7 +156,6 @@ export(sits_formula_linear)
export(sits_formula_logref)
export(sits_get_data)
export(sits_impute_linear)
export(sits_interp)
export(sits_kfold_validate)
export(sits_label_classification)
export(sits_labels)
Expand All @@ -196,7 +165,6 @@ export(sits_merge)
export(sits_metadata_to_csv)
export(sits_mlp)
export(sits_mlr)
export(sits_mutate_bands)
export(sits_patterns)
export(sits_regularize)
export(sits_rfor)
Expand All @@ -215,12 +183,14 @@ export(sits_to_xlsx)
export(sits_to_zoo)
export(sits_train)
export(sits_twdtw_classify)
export(sits_uncertainty)
export(sits_values)
export(sits_view)
export(sits_whittaker)
export(sits_xgboost)
importFrom(Rcpp,sourceCpp)
importFrom(data.table,":=")
importFrom(dplyr,.data)
importFrom(lubridate,"%m+%")
importFrom(lubridate,"%within%")
importFrom(magrittr,"%>%")
Expand Down
8 changes: 4 additions & 4 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

apply_transition_matrix <- function(data_before, data, transition_matrix) {
.Call(`_sits_apply_transition_matrix`, data_before, data, transition_matrix)
}

bayes_smoother <- function(m, m_nrow, m_ncol, w, sigma, covar_sigma0) {
.Call(`_sits_bayes_smoother`, m, m_nrow, m_ncol, w, sigma, covar_sigma0)
}
Expand All @@ -17,6 +13,10 @@ bilateral_smoother <- function(m, m_nrow, m_ncol, w, tau) {
.Call(`_sits_bilateral_smoother`, m, m_nrow, m_ncol, w, tau)
}

entropy_probs <- function(mtx, n) {
.Call(`_sits_entropy_probs`, mtx, n)
}

linear_interp <- function(mtx) {
.Call(`_sits_linear_interp`, mtx)
}
Expand Down
28 changes: 28 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,31 @@ NULL
#' cube (the name of the cube associated with the data),
#' time_series (list containing a tibble with the values of the time series).
NULL

#'@title Samples of Amazon tropical forest biome for deforestation analysis
#'
#'
#' @docType data
#' @name samples_l8_rondonia_2bands.rda
#' @keywords datasets
#'
#' @description
#' A sits tibble with time series samples from Brazilian Amazonia rain forest.
#'
#' The labels are: "Deforestation", "Forest", "NatNonForest" and "Pasture".
#'
#' The time series were extracted from the Landsat-8 BDC data cube
#' (collection = "LC8_30_16D_STK-1", tiles = "038047").
#' These time series comprehends a period of 12 months
#' (25 observations) from "2018-07-12" to "2019-07-28".
#' The extracted bands are NDVI and EVI.
#' Cloudy values were removed and interpolated.
#'
#' @format
#' A \code{sits} tibble with 160 samples.
#'
#'
#' @usage data("samples_l8_rondonia_2bands")
#'
NULL

Loading

0 comments on commit f0879bd

Please sign in to comment.