Skip to contents

This function will compute all segments upstream length at the initial and final node and save the result in a shapefile

Usage

TNETshape_computeUpstreamLength(
  path_segments,
  export_file = NULL,
  inBV = FALSE
)

Arguments

path_segments

Path to the shapefile with all segments

export_file

Path to the shapefile with the results. if NULL, the result is paste as a variable.

inBV

bool if TRUE, segments are cut into sub watershed before computation (needs a BV column with all sub watershed of each segments in the path_segment shapefile). If FALSE, all the shapefile is used

Value

data.frame with the result if export_file = NULL

Details

Columns created

If inBV = TRUE, the columns created in the result shapefile are LUpI_sBV (length upstream at the initial node) and LUpF_sBV (length upstream at the final node)

If inBV = FALSE, the columns created in the result shapefile are LUpI (length upstream at the initial node) and LUpF (length upstream at the final node)

Examples

TNETshape_computeUpstreamLength(path_segments,export_file)
#> Error: object 'path_segments' not found