sits_get_class: Get values from classified maps

View source: R/sits_get_class.R

sits_get_classR Documentation

Get values from classified maps

Description

Given a set of lat/long locations and a classified cube, retrieve the class of each point.

Usage

sits_get_class(cube, samples)

## Default S3 method:
sits_get_class(cube, samples)

## S3 method for class 'csv'
sits_get_class(cube, samples)

## S3 method for class 'shp'
sits_get_class(cube, samples)

## S3 method for class 'sf'
sits_get_class(cube, samples)

## S3 method for class 'sits'
sits_get_class(cube, samples)

## S3 method for class 'data.frame'
sits_get_class(cube, samples)

Arguments

cube

Classified data cube from where data is to be retrieved. (class "class_cube").

samples

Location of the samples to be retrieved. Either a tibble of class "sits", an "sf" object, the name of a shapefile or csv file, or a data.frame with columns "longitude" and "latitude"

Value

A tibble of with columns <longitude, latitude, start_date, end_date, label>.

Note

There are four ways of specifying data to be retrieved using the samples parameter: (a) CSV file: a CSV file with columns longitude, latitude; (b) SHP file: a shapefile in POINT geometry; (c) sits object: A sits tibble; (d) sf object: An link[sf]{sf} object with POINT or geometry; (e) data.frame: A data.frame with longitude and latitude.

Author(s)

Gilberto Camara


e-sensing/sits documentation built on Feb. 13, 2025, 2:22 a.m.