Learn R Programming

⚠️There's a newer version (1.12.0) of this package.Take me there.

sits (version 1.1.0)

Satellite Image Time Series Analysis for Earth Observation Data Cubes

Description

An end-to-end toolkit for land use and land cover classification using big Earth observation data, based on machine learning methods applied to satellite image data cubes, as described in Simoes et al (2021) . Builds regular data cubes from collections in AWS, Microsoft Planetary Computer, Brazil Data Cube, and Digital Earth Africa using the STAC protocol and the 'gdalcubes' R package . Supports visualization methods for images and time series and smoothing filters for dealing with noisy time series. Includes functions for quality assessment of training samples using self-organized maps as presented by Santos et al (2021) . Provides machine learning methods including support vector machines, random forests, extreme gradient boosting, multi-layer perceptrons, temporal convolutional neural networks , residual networks , and temporal attention encoders . Performs efficient classification of big Earth observation data cubes and includes functions for post-classification smoothing based on Bayesian inference, and methods for uncertainty assessment. Enables best practices for estimating area and assessing accuracy of land change as recommended by Olofsson et al(2014) . Minimum recommended requirements: 16 GB RAM and 4 CPU dual-core.

Copy Link

Version

Install

install.packages('sits')

Monthly Downloads

526

Version

1.1.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Gilberto Camara

Last Published

July 7th, 2022

Functions in sits (1.1.0)

check_functions

Check functions
.apply_estimate_block_size

Estimate the number of blocks
comparison_functions

Comparison functions
.apply_across

Apply an expression across all bands
.apply_capture_expression

Captures a band expression
config_file

Return the default configuration file
cerrado_2classes

Samples of classes Cerrado and Pasture
config_internals_file

Return the internal configuration file (only for developers)
config_colors_file

Return the default configuration file for colors
.cube_bands_check

Check if bands are part of a data cube
.apply_input_bands

Finds out all existing bands in an expression
.apply_get_all_names

Returns all names in an expression
.apply_find_missing_band

Finds the missing bands in a cube
.config_colors

Get colors associated to the labels
.config_data_meta_type

Check metatype associated to the data
.config_check_bands

Check band availability
.aws_tiles

Verify items tiles
.apply_input_kernels

Returns all kernel functions in an expression
.apply_missing_band

Create a list of jobs
.apply_out_file_name

Returns a new file name
.config_local_file_extension

Get local file extensions
.config_metadata_search_strategies

Retrieve the valid types of metadata search
.config_new_source

Include a new source in the configuration
.config_processing_bloat

Retrieve the processing bloat
.config_new_band

Include a new band in the configuration
.config_names

Get names associated to a configuration key
.config_new_cloud_band

Include a new cloud band in the configuration
.config_new_collection

Include a new collection in the configuration
.config_gtiff_default_options

Check GEOTIFF creation options
.create_filename

Create file name
.config_get

Given a key, get config values
.cube_band_minimum_value

Minimum value of a cube band
.cube_band_maximum_value

Maximum value of a cube band
.config_user_file

Return the user configuration file
.create_chunk_file

Create chunk file
.config_raster_pkg

Retrieve the raster package to be used
.config_rstac_limit

Retrieve the rstac pagination limit
.cube_area_freq

Given a labelled cube, return the band information
.cube_band_scale_factor

Scale factor of a cube band
.cube_bands

Return bands of a data cube
.cube_check

Check if R object is a data cube
.cube_collection

Return collection of a data cube
.cube_band_offset_value

Offset value of a cube band
.cube_derived_create

Create a data cube derived from another
.cube_extract

Given a band, return a set of values for chosen location
.cube_band_missing_value

Missing value of a cube band
.cube_labels

Return the labels of the cube
.cube_params_block

Determine the block spatial parameters of a given cube
.cube_s3class

Return the S3 class of the cube
.cube_resolution

Return the resolution of the cube
.cube_create

Creates the description of a data cube
.cube_crs

Return crs of a data cube
.cube_source

Get cube source
.cube_size

Return the size of the cube (nrows x ncols)
.cube_is_equal

Verify if two cubes are equal
.cube_tiles

Get cube tiles
.cube_is_regular

Check if cube is regular
.cube_tile_bbox

Get bbox of a cube (single tile)
.cube_yres

Return the cube resolution of the y axis
.find_closest

Find the closest points.
.cube_unique_bbox

Check if bboxes of all tiles of the cube are the same
.gc_create_pack

Create a gdalcubes::pack object
.gc_create_raster_cube

Create an gdalcubes::raster_cube object
.cube_unique_tile_size

Check if sizes of all tiles of the cube are the same
.gc_save_raster_cube

Saves the images of a raster cube.
.gc_regularize

Build a regular data cube from an irregular one
.gc_create_cube_view

Create a cube_view object
.gc_create_database_stac

Create an image_collection object
.mesma_scale_endmembers

Scale the endmembers spectra
.raster_check_bbox

Check for bbox object consistency
.gc_create_cloud_mask

Create an gdalcubes::image_mask object
.gc_arrange_images

Images arrangement in sits cube
.raster_check_block

Check for block object consistency
.raster_check_package

Check for raster package availability
.raster_gdal_datatypes

Match sits data types to GDAL data types
.raster_gdal_datatype

Convert internal data type to gdal data type
.raster_freq

Raster package internal frequency values function
.raster_new_rast

Raster package internal create raster object function
.raster_get_values

Raster package internal get values function
.raster_extract

Raster package internal extract values function
.raster_open_rast

Raster package internal open raster function
.cube_unique_bands

Check if the bands of all tiles of the cube are the same
.cube_token_generator

Generate token to cube
.raster_merge

Merge all input files into one raster file
.mesma_raster_blocks_estimate

Estimate the number of blocks
.mesma_raster_blocks

Define a reasonable block size to process an image subset
.cube_unique_timeline

Check if timelines all tiles of the cube are the same
.cube_xres

Return the cube resolution of the x axis
.raster_colrow

Raster package internal frequency values function
.gc_missing_tiles

Finds the missing tiles in a regularized cube
.gc_get_valid_timeline

Get the timeline of intersection in all tiles
.raster_crop_metadata

Raster package internal crop raster function
.raster_read_stack

Raster package internal read raster stack file function
.raster_data_type

Raster package internal data type representation
.raster_params_file

Determine the file params to write in the metadata
.raster_open_stack

Raster package internal open raster stack function
.sits_bbox_intersect

Intersection between a bounding box and a cube
.sits_bbox_to_sf

Convert a bounding box to a sf object (polygon)
.sits_classify_multicores

Classify a chunk of raster data using multicores
.sits_classify_check_params

Check classification parameters
.raster_crop

Raster package internal crop raster function
.raster_rast

Raster package internal object creation
.raster_properties

Raster package internal object properties
.raster_set_values

Raster package internal set values function
.raster_resampling

Raster package internal resampling method
.raster_supported_packages

Supported raster packages
.sits_coords_to_bbox_wgs84

Convert coordinates to bounding box
.sits_cluster_validity

Cluster validity indices
.sits_create_folds

Create partitions of a data set
.sits_csv_check

Check if a CSV tibble is valid
.sits_avg_polygon

Extracts the time series average by polygon.
.sits_cluster_dendro_bestcut

Compute validity indexes to a range of cut height
.sits_cluster_dendrogram

Compute a dendrogram using hierarchical clustering
.sits_accuracy_pred_ref

Obtains the predicted value of a reference set
.sits_distances

Use time series values as distances for training patterns
.sits_distances_classify

Classify a distances tibble using machine learning models
.sits_ml_model_samples

Get the samples from a ml_model
.sits_mass_ginv

Generalized Inverse of a Matrix
.sits_distances_sample

Sample a percentage of a time series distance matrix
.sits_get_samples_from_shp

Transform a shapefile into a samples file
.sits_fast_apply

Apply a function to one band of a time series
.sits_get_samples_from_sf

Transform an sf object into a samples file
.sits_get_samples_from_csv

Transform a shapefile into a samples file
.sits_get_data_check

Check if all points have been retrieved
.sits_function_factory

Create a closure for calling functions with and without data
.raster_write_rast

Raster package internal write raster file function
.sits_filter_intersecting_tiles

Filter tiles that intersects with samples
.sits_accuracy_area_assess

Support for Area-weighted post-classification accuracy
.sits_get_ts

Dispatch function to get time series from data cubes and cloud services
.sits_get_top_values

Get top values of a raster.
.sits_ml_normalization_param

Normalize the time series in the given sits_tibble
.sits_parse_roi_cube.xy

Parse a ROI defined as XY
.sits_plot_allyears

Plot all intervals of one time series for the same lat/long together
.sits_ml_normalize_data

Normalize the time series in the given sits_tibble
.sits_plot_ggplot_together

Plot many time series together using ggplot
.sits_plot_ggplot_series

Plot one time series using ggplot
.sits_plot_dendrogram

Plot a dendrogram
.sits_parse_roi_cube

Parse is a ROI is valid for an existing data cube
.sits_parallel_reset_node

Recreates a cluster worker
.sits_parallel_stop

Stop all workers of the sits cluster
.sits_plot_resample_class

Calculate resample params for classified images
.sits_parallel_map

Maps a function to a given list in parallel or sequential processing
.sits_parallel_is_open

Check if sits clusters are open or not
.sits_ml_normalize_matrix

Normalize the time series values in the case of a matrix
.sits_plot_twdtw_alignments

Plot classification alignments using the dtwSat package
.sits_parse_roi_cube.ll

Parse a ROI defined as lat-long
.sits_parse_roi_cube.sf

Parse is a ROI defined as sf is valid for an existing data cube
.sits_parallel_start

Start a new sits cluster for parallel processing
.sits_plot_ggplot_series_na

Plot one time series with NAs using ggplot
.sits_plot_twdtw_class

Plot classification results using the dtwSat package
.sits_proj_to_latlong

Coordinate transformation (X/Y to lat/long)
.sits_raster_block_list

Calculate a list of blocks to be read from disk to memory
.sits_oversample_smote

Oversample a dataset by SMOTE.
.sits_raster_data_read

Read a block of values retrieved from a set of raster images
.sits_plot_title

Create a plot title to use with ggplot
.sits_raster_sub_image

Find the dimensions and location of a spatial ROI in a data cube
.sits_plot_ggplot_series_no_na

Plot one time series using ggplot (no NAs present)
.sits_raster_blocks_estimate

Estimate the number of blocks
.sits_raster_blocks

Define a reasonable block size to process an image subset
.sits_raster_data_get_ts

Extract a time series from raster
.sits_roi_sf_to_geojson

Convert a ROI defined as sf object to a geojson polygon geometry
.sits_proj_format_crs

Checks if the crs provided is valid
.sits_proj_from_latlong

Coordinate transformation (lat/long to X/Y)
.sits_raster_sub_image_default

Find the dimensions of the sub image without ROI
.sits_raster_sub_image_from_bbox

Extract a sub_image from a bounding box and a cube
.sits_raster_sub_image_from_block

Extract a sub_image from a valid block
.sits_shp_check_validity

Check the validity of the shape file and return an sf object
.sits_samples_split

Split a sits tibble
.sits_smote

Oversample a dataset by SMOTE.
.sits_roi_bbox

Find the bounding box for a spatial ROI in a data cube
.sits_roi_bbox.ll

Find the bounding box for a spatial ROI defined as a lat/lon box
.sits_roi_bbox.sf

Find the bounding box for a spatial ROI defined as an sf object
.sits_som_bayes_estimate

Probability of a sample belongs to a cluster using bayesian filter
.sits_som_label_neurons

Label neurons
.sits_roi_bbox.xy

Find the bounding box for a spatial ROI defined as a bounding box
.sits_som_paint_neurons

Paint neurons
.sits_tibble_test

Tests if a sits tibble is valid
.sits_plot_together

Plot a set of time series for the same spatiotemporal reference
.sits_raster_sub_image_intersects

Informs if a spatial ROI intersects a data cube
.sits_raster_data_preprocess

Preprocess a set of values retrieved from a raster
.sits_sf_point_to_tibble

Obtain a tibble with latitude/longitude points from POINT geometry
.sits_timeline_idx_from_dates

Create a list of time indexes from the dates index
.sits_timeline_format

Find if the date information is correct
.sits_tibble

Create a sits tibble to store the time series information
.sits_transform_samples

Transform samples to wgs84
.sits_timeline_valid_date

Test if date fits with the timeline
.sits_timeline_match

Find dates in the input data cube that match those of the patterns
.sits_timeline_match_indexes

Find indexes in a timeline that match the reference dates
.sits_tibble_align_dates

Aligns dates of time series to a reference date
.sits_tibble_bands_check

Check that the requested bands exist in the samples
.sits_sf_polygon_to_tibble

Obtain a tibble from POLYGON geometry
.sits_timeline_class_info

Define the information required for classifying time series
.sits_timeline_check

Checks that the timeline of all time series of a data set are equal
.sits_timeline_check_cube

Check cube timeline against requested start and end dates
.sits_sgolay_coef

Savitzky-Golay smoothing filter coefficients
.sits_sf_to_tibble

Obtain a tibble with lat/long points to be retrieved from an sf object
.stac_select_bands

Select stac items by sits bands.
.stac_items_query

Creates a query to send to the STAC API
.smth_block_filename

Create a filename to store an output block from smoothing operation
.sits_twdtw_matches_to_prediction

Transform patterns from TWDTW format to sits format
.sits_twdtw_breaks

Classify a sits tibble using the matches found by the TWDTW methods
.sits_twdtw_from_tibble

Export data to be used by the dtwSat package
.smth_estimate_block_size

Estimate the number of blocks to run .sits_split_cluster
.stac_add_gdal_vsi

Add href locator to gdal file
.sits_timeline_dist_indexes

Indexes to extract data from a distance table for classification
.sits_tibble_prediction

Create an empty tibble to store the results of predictions
.sits_timeline_during

Find the subset of a timeline that is contained in an interval defined by start_date and end_date
.stac_format_platform

Platform format
.stac_format_datetime

Datetime format
.sits_tibble_prune

Checks that the timeline of all time series of a data set are equal
.torch_linear_batch_norm_relu_dropout

Torch module for linear MLP
.torch_conv1D_batch_norm_relu_dropout

Torch module for Conv1D + Batch Norm + Relu + Dropout
.torch_conv1D_batch_norm_relu

Torch module for Conv1D + Batch Norm + Relu
.torch_linear_batch_norm_relu

Torch module for linear MLP
.torch_light_temporal_attention_encoder

Torch module for temporal attention encoder
.torch_linear_relu_dropout

Torch module for linear transformation with relu activation and dropout
.torch_conv1D_batch_norm

Torch module for Conv1D + Batch Norm
.torch_batch_conv1D_batch_norm_relu

Torch module for BatchNorm + Conv1D + Batch Norm + Relu
.torch_multi_head_attention

Torch module for calculating multi-head attention
.torch_multi_linear_batch_norm_relu

Torch module for linear MLP
.torch_temporal_attention_encoder

Torch module for temporal attention encoder
.torch_scaled_dot_product_attention

Torch module for calculating attention from query, keys and values
.tuning_pick_random

Get random hyper-parameter
.tuning_params_as_tibble

Convert hyper-parameters list to a tibble
.view_resample_size

Return the cell size for the image to be resamples
file_info_functions

Functions to work with file info tibble
.view_get_colors

Return the colors associated to the classified image
.usgs_format_tiles

Format tile parameter provided by users
.torch_pixel_spatial_encoder

Torch module for spatial encoder
.torch_positional_encoder

Torch module for positional encoder
plot.predicted

Plot time series predictions
plot.rfor_model

Plot Random Forest model
plot.patterns

Plot patterns that describe classes
%>%

Pipe
plot.probs_cube

Plot probability cubes
plot.classified_image

Plot classified images
plot.raster_cube

Plot RGB data cubes
plot

Plot time series
plot.som_evaluate_cluster

Plot confusion between clusters
plot.geo_distances

Make a kernel density plot of samples distances.
:=

Set by reference in data.table
print.sits_area_assessment

Print the area assessment
plot.xgb_model

Plot XGB model
plot.uncertainty_cube

Plot uncertainty cubes
plot.som_map

Plot a SOM map
samples_l8_rondonia_2bands

Samples of Amazon tropical forest biome for deforestation analysis
print.sits_assessment

Print the values of a confusion matrix
point_mt_6bands

A time series sample with data from 2000 to 2016
samples_modis_4bands

Samples of nine classes for the state of Mato Grosso
plot.torch_model

Plot Torch (deep learning) model
sits_bbox

Get the bounding box of the data
sits_classify

Classify time series or data cubes
sits_accuracy_summary

Print accuracy summary
sits_apply

Apply a function on a set of time series
sits_as_sf

Return a sits_tibble or sits_cube as an sf object.
sits_bands

Get the names of the bands
sits_cluster_clean

Removes labels that are minority in each cluster.
sits_cluster_frequency

Show label frequency in each cluster produced by dendrogram analysis
sits-package

sits
sits_accuracy

Assess classification accuracy (area-weighted method)
sits_debug_log

sits log functions
sits_filters

Filter time series and data cubes
sits_clustering

Find clusters in time series samples
sits_confidence_sampling

Suggest high confidence samples to increase the training set.
sits_cube

Create data cubes from image collections
sits_configuration

Configure parameters for sits package
sits_formula_linear

Define a linear formula for classification models
sits_formula_logref

Define a loglinear formula for classification models
sits_geo_dist

Compute the minimum distances among samples and prediction points.
sits_get_data

Get time series from data cubes and cloud services
sits_label_classification

Build a labelled image from a probability cube
sits_labels_summary

Inform label distribution of a set of time series
sits_kfold_validate

Cross-validate time series samples
sits_merge

Merge two data sets (time series or cubes)
sits_labels

Get labels associated to a data set
sits_impute_linear

Replace NA values with linear interpolation
sits_lighttae

Train a model using Lightweight Temporal Self-Attention Encoder
sits_mixture_model

Multiple endmember spectral mixture analysis
sits_parallel_fault_tolerant

Fault tolerant version of some parallel functions
sits_mlp

Train multi-layer perceptron models using torch
sits_run_tests

Informs if sits tests should run
sits_regularize

Build a regular data cube from an irregular one
sits_select

Filter bands on a data set (tibble or cube)
sits_rfor

Train random forest models
sits_patterns

Find temporal patterns associated to a set of time series
sits_show_prediction

Shows the predicted labels for a classified tibble
sits_sample

Sample a percentage of a time series
sits_run_examples

Informs if sits examples should run
sits_reduce_imbalance

Reduce imbalance in a set of samples
sits_resnet

Train ResNet classification models
sits_to_xlsx

Save accuracy assessments as Excel files
sits_time_series

Get the time series for a row of a sits tibble
sits_tempcnn

Train temporal convolutional neural network models
sits_smooth

Smooth probability cubes with spatial predictors
sits_som

Use SOM for quality analysis of time series samples
sits_tae

Train a model using Temporal Self-Attention Encoder
sits_svm

Train support vector machine models
sits_train

Train classification models
sits_to_csv

Export a sits tibble metadata to the CSV format
sits_timeline

Get timeline of a cube or a set of time series
sits_uncertainty_sampling

Suggest samples for enhancing classification accuracy
sits_view

View data cubes and samples in leaflet
sits_twdtw_classify

Find matches between patterns and time series using TWDTW
sits_uncertainty

Estimate classification uncertainty based on probs cube
sits_validate

Validate time series samples
source_functions

Source functions
sits_xgboost

Train extreme gradient boosting models
sits_values

Return the values of a set of time series
sits_tuning

Tuning machine learning models hyper-parameters
source_bands

Source bands functions
`sits_labels<-`

Change the labels of a set of time series
sits_tuning_hparams

Tuning machine learning models hyper-parameters
source_cube

Functions to instantiate a new cube from a source
source_collection

Source collection functions