GetSurfaceValues: FUSION R command line interface - Super-function to run...

View source: R/SuperFunctions.R

GetSurfaceValuesR Documentation

FUSION R command line interface – Super-function to run SurfaceSample to get interpolated values from surface for (X,Y) locations.

Description

GetSurfaceValues builds an input file with the identifier (optional), X, and Y and runs SurfaceSample to interpolate a value from the specified surface. Output is a CSV file with the value.

Usage

GetSurfaceValues(
  df,
  xLabel = "X",
  yLabel = "Y",
  idLabel = "Value",
  surfaceFile = NULL,
  ...
)

Arguments

df

data frame containing columns for the identifier (optional), X, and Y.

xLabel

character: Label for the column containing the X value.

yLabel

character: Label for the column containing the Y value.

idLabel

character: Label for the new column in df containing the surface value.

surfaceFile

character: Name for the input surface files (PLANS DTM format). surfacefile may be a wildcard or text list file (extension .txt).

...

Additional parameters that will be passed to SurfaceSample.

Value

Returns a dataframe with an additional column containing the sampled surface values. If the surfacefile does not cover the location or contains invalid data, values for locations will be -1.0.

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.

Examples

## Not run: 
GetSurfaceValues(df, "X", "Y", "ground.dtm")

## End(Not run)

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