Learn R Programming

sits (version 0.10.0)

sits_get_data.shp_wtss_cube: Obtain time series from wtss based on SHP file

Description

Obtain time series from wtss based on SHP file

Usage

# S3 method for shp_wtss_cube
sits_get_data(
  cube,
  file,
  ...,
  start_date = NULL,
  end_date = NULL,
  bands = NULL,
  label = "NoClass",
  shp_attr = NULL,
  .n_shp_pol = 30
)

Arguments

cube

Data cube from where data is to be retrieved.

file

SHP File with information on the data to be retrieved.

...

Other parameters to be passed for specific types.

start_date

Start of the interval for the time series in "YYYY-MM-DD" format.

end_date

End of the interval for the time series in "YYYY-MM-DD" format.

bands

Bands to be retrieved.

label

Label to be assigned to the time series (optional).

shp_attr

Attribute in the shapefile to be used as a polygon label.

.n_shp_pol

Number of samples per polygon to be read (for POLYGON or MULTIPOLYGON shapes).

Value

A tibble with time series data and metadata.

Examples

Run this code
# NOT RUN {
# Read an CSV from a WTSS server
# Requires access to external service
wtss_cube <- sits_cube(
    type = "WTSS",
    URL = "http://www.esensing.dpi.inpe.br/wtss/",
    name = "MOD13Q1"
)
# define a shapefile and read from the points inside it from WTSS
shp <- system.file("extdata/shapefiles/agriculture/parcel_agriculture.shp",
    package = "sits"
)
parcel <- sits_get_data(wtss_cube, file = shp, .n_shp_pol = 5)
# }

Run the code above in your browser using DataLab