Description Usage Arguments Examples
Preforms a batch implementation of the csv_create function, allowing multiple high-res images to to processed into training files at the same time.
1 | csv_batch(raster_path, inPred, numSamps, fromVals, toVals)
|
raster_path |
A list of paths to the classified high-resolution imagery (use list.files) |
fromVals |
vector of the values in classified image |
toVals |
vector which values will be changes too |
inPredImage |
Name and path for the input image that will be used for predictions (Landsat/MODIS) |
ndPred |
No data value for the prediction image (normally 0) |
1 2 3 4 5 6 7 8 9 10 | Landsat_SA_CRS <-"..//Landsat_SA_CRS//Landsat_SA_AEA.tif"
shrub_mask_list <-list.files(path = "F:\\Projects\\Shrub_cover\\NGI_aerial_imagery\\shrub_masks\\",pattern = "*tif$",full.names = TRUE)
set.seed(seed = 33)
percent_cover <-csv_batch(raster_path = shrub_mask_list,inPred = Landsat_SA_CRS,numSamps = 5000)
Class numbers that will be mapped using the following scheme:
0 = no data such as background, clouds and shadow
1 = class for which percent cover is being calculated
2 = all other land cover classes
fromVals <- c(0,1, 2, 3)
toVals <- c(2,1, 2, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.