TNETshaped function needs to be launch each time you create a new river network. It’s created to be used with the french hydrological referenciel BD TOPAGE, but can possibly be used on other network.
Dependencies diagram
Here is a diagram with all functions inside of the TNETshape functions group. All function in this group are independent one to another but it was thinked to be used in this order.
Functions details
All drain computation and needed TNET computation functions can be launch in the rigth order with the
TNETshape_prepare()
function
Compute drain area
-
TNETshape_computeNdAreaDrain()
in order toTNETshape_computeAreaDrain()
to run, we need one node of calculation for every segments. But at confluences, one final node is shared between 2 segments.TNETshape_computeNdAreaDrain()
will move upstream all nodes at confluences in order to have one node for every segments.
-
TNETshape_computeAreaDrain()
Will compute drain area of all segments using Whitebox package. To see how to setup Whitebox for R, go there.
Compute needed TNET data
TNETshape_computeCoefQcalc()
will compute all coeficients needed to dispatch discharge data from J2000 river network to Topage river network in order to runTNET_computeQ()
. (More info can be found here)TNETshape_getSafran()
will intersect all segments with the SAFRAN grid in order to have all Safran ID to use for each segments.TNETshape_computePosition()
will get each segment position and orientation. Position is defined as the middle of the line between the initial and final node (in WGS84) and Orientation as the angle between North and the oriented line between the initial and final node.
Removing drain Area problems
-
TNETshape_removePbDrainArea()
will try to correct all drain area problems in the shapefile. (It’s possible that some problems could not be corrected). To see how every problem is corrected, see the function help. The functionTNETdiagnostic_pbDrainArea()
is used to identify all problems.