create_general_contour_OCN {OCNet} | R Documentation |
Create an Optimal Channel Network on a general contour
Description
Function that performs the OCN search algorithm on a general contour and creates OCN at the flow direction (FD) level.
Usage
create_general_contour_OCN(flowDirStart, expEnergy = 0.5,
cellsize = 1, xllcorner = 0.5 * cellsize, yllcorner = 0.5 *
cellsize, nIter = NULL, nUpdates = 50,
initialNoCoolingPhase = 0, coolingRate = 1,
showIntermediatePlots = FALSE, thrADraw = NULL,
easyDraw = NULL, saveEnergy = FALSE, saveExitFlag = FALSE,
displayUpdates = 1)
Arguments
flowDirStart |
Matrix with custom initial flow directions. Cells outside the catchment must have value equal to
Note that |
expEnergy |
Exponent of the functional |
cellsize |
Size of a pixel in planar units. |
xllcorner |
Longitudinal (column-wise) coordinate of the lower-left pixel of |
yllcorner |
Latitudinal (row-wise) coordinate of the lower-left pixel of |
nIter |
Number of iterations for the OCN search algorithm. Default is 40 times the number of non- |
nUpdates |
Number of updates given during the OCN search process (only effective if |
initialNoCoolingPhase , coolingRate |
Parameters of the function used to describe the temperature of the simulated annealing algorithm. See details. |
showIntermediatePlots |
If |
thrADraw |
Threshold drainage area value used to display the network (only effective when |
easyDraw |
Logical. If |
saveEnergy |
If |
saveExitFlag |
If |
displayUpdates |
State if updates are printed on the console while the OCN search algorithm runs.
|
Value
A river
object as in create_OCN
, to which the reader is referred for detailed documentation.
However, note that in this case dimX
and dimY
are equal to the number of columns and rows of flowDirStart
, respectively,
while nNodes
is the number of non-NaN
pixels in flowDirStart
. Hence, nNodes
is generally lower than
dimX*dimY
. The additionally exported vector FD$toDEM
identifies the indices of the pixels of the landscape/flow direction matrix
that belong to the catchment (i.e., they are not NaN
).
Examples
OCN1 <- create_general_contour_OCN(flowDir, nIter=0) # initial flow directions
OCN2 <- create_general_contour_OCN(flowDir) # perform OCN algorithm
draw_simple_OCN(OCN1)
draw_simple_OCN(OCN2)