create_training_points_from_polygons: Sample training points from a set of polygons

View source: R/create_training_data.R

create_training_points_from_polygonsR Documentation

Sample training points from a set of polygons

Description

Sample training points from a set of polygons

Usage

create_training_points_from_polygons(
  polygons,
  analysis_region,
  sample_rate = 0.5,
  region_margin = 50,
  polygon_class = "positive",
  nonpolygon_class = "negative"
)

Arguments

polygons

SpatVector of polygons indicating all locations belonging to the class you wish to predict

analysis_region

polygon or raster indicating the extent from which points can be sampled. Only regions covered by non-NA cells will be included if analysis_region is a raster.

sample_rate

Samples per km^2

region_margin

width in meters of margin to draw around polygon edges which will not be used for sampling.

polygon_class

label for points sampled from within polygons

nonpolygon_class

label for points sampled outside polygons


tabrasel/WetlandTools documentation built on Dec. 20, 2024, 8:50 a.m.