Description Usage Arguments Value
View source: R/sample_points.r
For each class in .shp polygon file, Sample training data for image classification from multiple image tiles using their raster bricks as predictors.
1 2 3 4 |
r_train_dir |
A directory where .tifs for training can be found for multiple tiles |
text_train_dir |
A directory where .tifs of the textures associated with r_train_dir |
tile |
Character vector or CVS file. Names of tile(s) to run a cvs file. 'ALL' will run all tiles in r_train_dir. Default is 'ALL' |
text |
Character vector or CVS file. Names of text(s) to run in a cvs file. 'ALL' will run all tiles in text_train_dir. Default is 'ALL' |
prob_tifs |
Boolean (FALSE) if not wanted, Directory if wanted. tifs of each raster to run with 0 vaue for the areas that we don't want to sample and 1 fore the ones that we want to sample. Default FALSE |
vuln_classes |
A list of the classes you want to model The list can contain one or more vectors. Each vector represents a seperate vegetation class and response variable for the model and the vector elements are synonyms used to describe that class The fist place in each vector will be used in the output name used to store the calibrated model, so it should not contain spaces. The other places should appear as attributes in the field 'field_name' of Pols |
training_pol_filename |
Full path to the vector file (SpatialPointsDataFrame) of which one field contains the vuln.classes |
field_name |
Character. The field in AOI.filename that contains the vuln_classes |
ninputs_tile |
Integer. Number of inputs that we have fore each tile, including the tile, for exemple number of textures |
data_outp_dir |
The folder where you want to save the sampled data |
abs_samp |
Integer. How many 'absence' pixels should be randomly selected from eah tile to train the model. Default is 100. |
parallel |
Boolean. Should the code be run in parallel using the doParallel package? Default is FALSE |
nWorkers |
Integer. If running the ocde in parallel, how many workers should be used? Default is 4 |
data_outp_name |
Character. Name of the data to output |
randompt |
Boolean. if True random points will be added in the tiles that doesn't have any visual point. Default TRUE |
EOS |
If EOS true the for loop will be avoided if False will work with a for loop. Default FALSE |
Saves a serialize object with the list with class-specific data frames of which the first column is the presence-absence response that can be used to train distribution model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.