CanopyMaxima: FUSION R command line interface - Finds and reports surface...

View source: R/CanopyMaxima.R

CanopyMaximaR Documentation

FUSION R command line interface – Finds and reports surface maxima using a variable-size window based on surface height.

Description

CanopyMaxima creates command lines for the FUSION CanopyMaxima program and optionally executes them.

Usage

CanopyMaxima(
  inputfile = NULL,
  outputfile = NULL,
  quiet = FALSE,
  verbose = FALSE,
  version = FALSE,
  newlog = FALSE,
  log = NULL,
  locale = FALSE,
  ground = NULL,
  threshold = NULL,
  wse = NULL,
  mult = NULL,
  res = NULL,
  outxy = NULL,
  crad = FALSE,
  shape = FALSE,
  img8 = FALSE,
  img24 = FALSE,
  new = FALSE,
  summary = FALSE,
  projection = NULL,
  minmax = NULL,
  use64bit = TRUE,
  runCmd = TRUE,
  saveCmd = TRUE,
  cmdFile = NULL,
  cmdClear = FALSE,
  echoCmd = FALSE,
  comment = NULL
)

Arguments

inputfile

character (required): Name of the canopy height model file (PLANS DTM with .dtm extension).

outputfile

character (required): Name for the output ASCII CSV file that will contain the maxima information.

quiet

boolean: Suppress all output during the run.

verbose

boolean: Display all status information during the run.

version

boolean: Report version information and exit with no processing.

newlog

boolean: Erase the existing log file and start a new log

log

character: Use the name specified for the log file.

locale

boolean: Adjust program logic to input and output locale-specific numeric formats (e.g. use a comma for the decimal separator).

ground

character: Use the specified bare-earth surface model to normalize the LIDAR data file may be wildcard or text list file (extension .txt only).

threshold

numeric: Limit analysis to areas above a height of # units (default: 10.0).

wse

character: "A,B,C,D[,E,F]": Constant and coefficients for the variable window size equation used to compute the window size given the canopy surface height window: width = A + B*ht + C*ht^2 + D*ht^3 (defaults for metric: A = 2.51503, B = 0, C = 0.00901, D = 0) Use A = 8.251, B = 0, C = 0.00274, D = 0 for imperial units . E and F parameters are for 4th and 5th order polynomial terms.

mult

numeric: Window size multiplier (default: 1.0). Applied after the window size is computed using wse options.

res

numeric: Resolution multiplier for intermediate grids (default: 2.0). A value of 2 results in intermediate grids with twice the number of rows and columns.

outxy

character: "minx,miny,maxx,maxy": Restrict output of tree located outside of the extent defined by (minx,miny) and (maxx,maxy). Tree on the left and bottom edges will be output, those on the top and right edges will not.

crad

boolean: Output 16 individual crown radii for each tree. Radii start at 3 o'clock and are in counter-clockwise order at 22.5 degree intervals.

shape

boolean: Create shapefile outputs for the canopy maxima points and the perimeter of the area associated with each maxima.

img8

boolean: Create an 8-bit image showing local maxima and minima (use when 24 bit image fails due to large canopy model).

img24

boolean: Create an 24-bit image showing local maxima and minima.

new

boolean: Create a new output file (erase output file if one exists).

summary

boolean: Produce a summary file containing tree height summary statistics.

projection

character: "filename": Associate the specified projection file with shapefile and raster data products.

minmax

numeric: Change the calculation method for the min/max crown width. Options: 0 = report the max and min crown radii * 2 1 = report the max and min diameters 2 = report N-S diameter and the E-W diameter 3 = report max diameter and the diameter perpendicular to the max diameter line and the rotation to the max line.

use64bit

boolean: indicates 64-bit version of the program should be used.

runCmd

boolean: indicates command line should be executed.

saveCmd

boolean: indicates command line should be written to a file.

cmdFile

character: contains the name of the file to which commands should be written.

cmdClear

boolean: indicates file for commands should be deleted (cleared) before the command line is written.

echoCmd

boolean: indicates command line should be displayed.

comment

character string containing comment to be written to command file before writing the actual command. Only used when runCmd = FALSE and saveCmd = TRUE. When written, there is always a blank line before the comment line in the command file.

Details

The default equation used to compute the window size was developed using metric LIDAR return data (XYZ in meters). When using other measurement units, different equation coefficients are needed.

The default behavior is to append new trees to an existing file. If you mix outputs from runs with different command line options, column labels may not make sense. This is especially true with the /crad and /minmax options.

Value

Return value depends on runCmd. if runCmd = TRUE, return value is the (invisible) integer value return from the operating system after running the command. if runCmd = FALSE, return value is the (invisible) command line.

Multiple Commands

LTKFunctions generate a separate command for each item when the required parameters are lists. This is useful when you want to use the same command and options but different input data and output files. However, this works only when the switches and options are the same for all commands (not lists). If you try to use a list of switches and/or options and a list of input files, you will produce commands using all sets of switches and/or options for every input file.

See Also

Other LTKFunctions: CSV2Grid(), CanopyModel(), Catalog(), ClipDTM(), ClipData(), CloudMetrics(), Cover(), DTMDescribe(), DensityMetrics(), FilterData(), FirstLastReturn(), GridMetrics(), GridSample(), GridSurfaceCreate(), GridSurfaceStats(), GroundFilter(), IntensityImage(), JoinDB(), MergeDTM(), MergeData(), MergeRaster(), RepairGridDTM(), ReturnDensity(), SplitDTM(), SurfaceSample(), SurfaceStats(), TINSurfaceCreate(), ThinData(), TopoMetrics(), TreeSeg(), fusionwrapr-package

Examples

## Not run: 
CanopyMaxima("chm.dtm", "out.csv")

## End(Not run)

bmcgaughey1/fusionwrapr documentation built on Dec. 1, 2024, 7:13 a.m.