CanopyModel: FUSION R command line interface - Creates a canopy surface...

View source: R/CanopyModel.R

CanopyModelR Documentation

FUSION R command line interface – Creates a canopy surface model from a point cloud.

Description

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

Usage

CanopyModel(
  surfacefile = NULL,
  cellsize = NULL,
  xyunits = NULL,
  zunits = NULL,
  coordsys = NULL,
  zone = NULL,
  horizdatum = NULL,
  vertdatum = NULL,
  datafile = NULL,
  quiet = FALSE,
  verbose = FALSE,
  version = FALSE,
  newlog = FALSE,
  log = NULL,
  locale = FALSE,
  nolaszipdll = FALSE,
  skipfilecheck = FALSE,
  median = NULL,
  smooth = NULL,
  texture = NULL,
  slope = FALSE,
  aspect = FALSE,
  outlier = NULL,
  multiplier = NULL,
  return = NULL,
  class = NULL,
  ignoreoverlap = FALSE,
  ground = NULL,
  hole = NULL,
  ascii = FALSE,
  surface = FALSE,
  peaks = FALSE,
  pointcount = FALSE,
  nofill = FALSE,
  grid = NULL,
  gridxy = NULL,
  align = NULL,
  extent = NULL,
  rasterorigin = FALSE,
  smoothfirst = FALSE,
  use64bit = TRUE,
  runCmd = TRUE,
  saveCmd = TRUE,
  cmdFile = NULL,
  cmdClear = FALSE,
  echoCmd = FALSE,
  comment = NULL
)

Arguments

surfacefile

character (required): Name for output surface file (stored in PLANS DTM format with .dtm extension). If the folder for the output file does not exist, it will be created when the function is called even when saving commands to a batch file.

cellsize

numeric (required): Desired grid cell size in the same units as LIDAR data.

xyunits

character (required): Units for LIDAR data XY (M for meters, F for feet, O for other or unknown).

zunits

character (required): Units for LIDAR data elevations (M for meters, F for feet, O for other or unknown).

coordsys

numeric (required): Coordinate system for LIDAR data: 0 for unknown 1 for UTM 2 for state plane)

zone

numeric (required): Coordinate system zone for LIDAR data (0 for unknown).

horizdatum

numeric (required): Horizontal datum: 0 for unknown 1 for NAD27 2 for NAD83

vertdatum

numeric (required): Vertical datum: 0 for unknown 1 for NGVD29 2 for NAVD88 3 for GRS80

datafile

character (required): Name(s) of lidar data files.

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).

nolaszipdll

boolean: Suppress the use of the LASzip dll (c) Martin Isenburg... removes support for compressed LAS (LAZ) files. This option is only useful for programs that read or write point files.

skipfilecheck

boolean: Skip logic that checks for valid point files and removes those that are invalid prior to the start of point processing. This option is designed to overcome some limitations with windows and wildcard processing. This option is only useful for programs that read point data.

median

numeric: Apply median filter to model using # by # neighbor window.

smooth

numeric: Apply mean filter to model using # by # neighbor window.

texture

numeric: Calculate the surface texture metric using # by # neighbor window.

slope

boolean: Calculate surface slope.

aspect

boolean: Calculate surface aspect.

outlier

character: "low,high": Omit points with elevations below low and above high. If used with a bare-earth surface this option will omit points with heights below low or above high.

multiplier

numeric: Multiply the output values by the constant.

return

character: "ccc...": Specifies the returns to be included in the sample (can include A,1,2,3,4,5,6,7,8,9,F,L,O) Options are specified without commas (e.g. /return:123) For LAS files only: F indicates first and only returns, L indicates last of many returns.

class

character: "#,#,#,...": LAS files only: Specifies that only points with classification values listed are to be included in the subsample. Classification values should be separated by a comma. e.g. (2,3,4,5) and can range from 0 to 31. If the first character in string is ~, the list is interpreted as the classes you DO NOT want included in the subsample. e.g. /class:~2,3 would include all class values EXCEPT 2 and 3.

ignoreoverlap

boolean: Ignore points with the overlap flag set (LAS V1.4+ format).

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).

hole

numeric: Defines the threshold for the hole filling logic. Any areas at or below the height will be filled unless the /nofill option is used.

ascii

boolean: Write output surface in ASCII raster format as well as DTM format. Extension will be .asc.

surface

boolean: Use the bare-earth surface model in conjunction with values specified in /outlier to omit points but create a surface that is not normalized relative to the bare-earth surface.

peaks

boolean: Preserve localized peaks in the final surface.

pointcount

boolean: Output the number of data points in each cell in addition to the canopy surface/height values. Counts are output in .DTM format. If there are no points for a cell, the elevation/height value for the cell is set to 999.0.

nofill

boolean: Don't fill holes in the canopy surface model. The default logic fills holes prior to doing any smoothing.

grid

character: "X1,X2,Y1,Y2": Force the origin of the output grid to be (X,Y) instead of computing an origin from the data extents and force the grid to be W units wide and H units high...W and H will be rounded up to a multiple of cellsize.

gridxy

character: "X1,X2,Y1,Y2": Force the origin of the output grid to be (X1,Y1) instead of computing an origin from the data extents and force the grid to use (X2,Y2) as the upper right corner of the coverage area. The actual upper right corner will be adjusted to be a multiple of cellsize.

align

character: Force the origin and extent of the output grid to match the lower left corner and extent of the specified PLANS format DTM file.

extent

character: Force the origin and extent of the output grid to match the lower left corner and extent of the specified PLANS format DTM file but adjust the origin to be an even multiple of the cell size and the width and height to be multiples of the cell size.

rasterorigin

boolean: Offsets the origin and adjusts the extent to correspond with raster data layers covering the same extent and using the same resolution. Only used with the /grid and /gridxy options.

smoothfirst

boolean: indicating smoothing should occur before median filtering. The default is for median filtering to happen before smoothing.

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.

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(), CanopyMaxima(), 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: 
CanopyModel("test.dtm", 2.0, "M", "M", 1, 10, 2, 2, "Test/pts.las")

## End(Not run)

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