samplePoints: samplePoints

samplePointsR Documentation

samplePoints

Description

#' SamplePoints is written to generate point samples for zones inside and outside of mapped landslide initiation zones. It is written specifically for working with output files from LS_poly, which I've been developing for analysis of the Tongass landslide inventory on Wrangell Island. The primary output from LS_poly used here is a raster of landslide initiation zones. These are used with a series of specified input rasters to define the range of predictor values found within the initiation patches. A raster mask is then defined to delineate areas within that range. Random point samples are then generated inside the initiation zones and outside the zones within the area of the mask. A buffer is placed around each point to preclude point placements too close to each other. Bins are generated for increments of each predictor for the entire initiation zone and mask area and for the inside and outside samples. These are used to compare the frequency distribution of values both between inside and outside the initiation zones and between the total area and the sample points.

Usage

samplePoints(
  inRaster = "nofile",
  areaPerSample = -9999,
  buffer = -9999,
  margin = -9999,
  ratio = -9999,
  nbins = -9999,
  R4rasters,
  I4rasters,
  minPatch = -9999,
  inPoints = "nofile",
  outPoints = "nofile",
  outMask = "nofile",
  outInit = "nofile",
  table = "nofile",
  scratchDir = "nofile",
  executableDir = "none"
)

Arguments

inRaster

Character: input initiation zone raster (.flt) generated by LS_poly.

areaPerSample

Numeric (dbl): area in square meters for each sample point. This determines the number of points and the point density.

buffer

Numeric (dbl): distance in meters to buffer around each point.

margin

Numeric (dbl): distance in meters to preclude point placement from the edge of the initiation zones.

ratio

Numeric (dbl): ratio of the number of points outside the initiation zones to the number inside, i.e., ratio = #outside/#inside.

nbins

Numeric (int): number of bins for each predictor.

R4rasters

(list): a list of real single-precision rasters to use as predictors. Each element of the list includes a name to assign the raster, the raster-file, and lower and upper cutoff values.

I4rasters

(list): a list of integer rasters to use as predictors. Each integer represents a nominal class, e.g., landform type.

minPatch

Numeric (dbl): minimum size in square meters for patches delineated in the raster mask.

inPoints

Character: output shapefile name (full path) for the inside points.

outPoints

Character: output shapefile name (full path) for the outside points.

outMask

Character: output raster (.flt) name (full path) for the mask.

outInit

Character: output raster (.flt) name (full path) for the initiation zones sampled.

table

Character: output table name (full path) for the binning results.

scratchDir

Character: scratch directory.

executableDir

Character: The directory where the executable file is located.

Value

returnCode, a value of zero indicates success


tabrasel/WetlandTools documentation built on June 1, 2025, 8:07 p.m.