View source: R/create_training_data.R
create_training_points_from_polygons | R Documentation |
Sample training points from a set of polygons
create_training_points_from_polygons(
polygons,
analysis_region,
sample_rate = 0.5,
region_margin = 50,
polygon_class = "positive",
nonpolygon_class = "negative"
)
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 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.