SurfaceSample: FUSION R command line interface - Function to interpolate...

View source: R/SurfaceSample.R

SurfaceSampleR Documentation

FUSION R command line interface – Function to interpolate surface values for XY locations.

Description

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

Usage

SurfaceSample(
  surfacefile = NULL,
  inputfile = NULL,
  outputfile = NULL,
  quiet = FALSE,
  verbose = FALSE,
  version = FALSE,
  newlog = FALSE,
  log = NULL,
  locale = FALSE,
  pattern = NULL,
  topo = NULL,
  noheader = FALSE,
  novoid = FALSE,
  id = FALSE,
  runCmd = TRUE,
  saveCmd = TRUE,
  cmdFile = NULL,
  cmdClear = FALSE,
  echoCmd = FALSE,
  comment = NULL
)

Arguments

surfacefile

character (required): Name for input surface file (PLANS DTM with .dtm extension). May be wildcard or text list file (extension .txt only).

inputfile

character (required): Name of file containing XY locations (space or comma delimited). If pattern is used with type 3, the inputfile should contain two coordinate pairs that specify the endpoints of the line. If id = TRUE, the inputfile should contain a point identifier in the first column.

outputfile

character (required): Name for the output ASCII CSV file.

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

pattern

character: "type,p1,p2,p3": Generate a test pattern of sample points centered on the XY location from the inputfile. Pattern type 1 is a radial network of p1 lines that are at least p2 long with sample points every p3 units. The first radial is at 3 o'clock. Radials are generated in counter-clockwise order. Pattern type 2 is a radial network of p1 lines that are at least p2 long with sample points every p3 units ON AVERAGE. The sample point spacing decreases as the distance from the XY location increases to provide sample point locations that represent a uniform area The first radial is at 3 o'clock. Radials are generated in counter-clockwise order. Pattern type 3 expects two coordinate pairs in the input data. The pairs specify the endpoints of a line. Lines with points spaced p1 units apart are created and written to the output.

topo

character: "dist,lat": Compute solar radiation index (SRI) as defined in: Keating, K. A.,P. J. P. Gogan, J. M. Vore, and L. R. Irby. 2007. A simple solar radiation index for wildlife habitat studies. Journal of Wildlife Management 71(4):1344-1348. Algorithm uses a 3- by 3-cell grid with cells that are dist by dist units to compute topographic attributes. Latitude values (lat) are in degrees with north positive and south negative. Output from this option includes slope, aspect, SRI, and other topographic indices. The range for SRI is 0.0 to 2.0 (differs from the -1.0 to 1.0 range in Keating et al. 2007).

noheader

boolean: Suppress the header line in the output file. This option is useful when you want to use PDQ to view the outputfile.

novoid

boolean: Suppress output for XY sample points outside the surface extent or for points with invalid surface elevations.

id

boolean: Read a point identifier from the first field of each line from the inputfile and output it as the first field of the outputfile. If id is used with pattern, a separate output file is created for each point in the inputfile. Output files are named using outputfile as the base name with the point identifier appended to the filename. Even when inputfile contains a single point, the outputfile name is modified to reflect the point identifier.

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(), CanopyModel(), Catalog(), ClipDTM(), ClipData(), CloudMetrics(), Cover(), DTMDescribe(), DensityMetrics(), FilterData(), FirstLastReturn(), GridMetrics(), GridSample(), GridSurfaceCreate(), GridSurfaceStats(), GroundFilter(), IntensityImage(), JoinDB(), MergeDTM(), MergeData(), MergeRaster(), RepairGridDTM(), ReturnDensity(), SplitDTM(), SurfaceStats(), TINSurfaceCreate(), ThinData(), TopoMetrics(), TreeSeg(), fusionwrapr-package

Examples

## Not run: 
SurfaceSample("ground.dtm", "in.csv", "out.csv")

## End(Not run)

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