sample_ccdc_by_catg: Uses SAGA-GIS and RSAGA to create N number of random samples...

View source: R/plot_ccdc_ts.R

sample_ccdc_by_catgR Documentation

Uses SAGA-GIS and RSAGA to create N number of random samples with provided polygons, inherits polygon attributes. Points also get attributed with the coefficient from a CCDC image for a given date. Points are returned as a data.frame. Useful function for a large area of interest, i.e., as a alternative to 'plot_ccdc_ts_quartiles'.

Description

Uses SAGA-GIS and RSAGA to create N number of random samples with provided polygons, inherits polygon attributes. Points also get attributed with the coefficient from a CCDC image for a given date. Points are returned as a data.frame. Useful function for a large area of interest, i.e., as a alternative to 'plot_ccdc_ts_quartiles'.

Usage

sample_ccdc_by_catg(
  polygons_pth,
  ccdc_img_pth,
  pnts_count,
  sep_dist,
  bands = c("blue", "green", "red", "nir", "swir1", "swir2", "therm"),
  env
)

Arguments

polygons_pth

(character) File path to polygon vector file with categories of interest.

ccdc_img_pth

(character) File path to raster file (e.g. GeoTiff) CCDC image for given date (see 'gen_ccdc_at_jdoy')

pnts_count

(integer) Total number of X-Y locations to sample throughout ALL polygons.

sep_dist

(integer) Minimum distance in map units that two sample locations can be.

bands

(character) Vector of band names present in CCDC image (in order), defaults to c('blue','green','red','nir','swir1','swir2','therm')

env

(RSAGA environment) A RSAGA environment to use.

Value

(data.frame) A data.frame with the sample locations, attributed with the polygon data and CCDC grid coefficient values.


HunterGleason/R.ccdc.tools documentation built on July 1, 2022, 10:37 a.m.