Skip to contents

This function will merge all segments between 2 confluences into 1 segment.

Usage

TNETshape_mergeSegments(path_segments, path_node,ID_exutoire = NULL,path_export, suffix_export='')

Arguments

path_segments

Path to the shapefile with segments to merge.

path_node

Path to the shapefile with all segments nodes.

ID_exutoire

ID to the most downstream segment. If NULL, it's automaticly set.

path_export

Path to the folder containing the results.

suffix_export

suffix to add to the result file.

Value

list of both created segment and node shapefiles.

Details

This function will merge all segments between 2 confluences into 1 segment. All info from the most downstream segment is kept. Segment length is updated.

Here a figure resuming the computation done in this function:

Examples

## Run directly the function providing all info
TNETshape_mergeSegments(path_segments = "path/to/segments.shp",
                        path_node = "path/to/nodes.shp",
                        path_export = "path/to/exportFolder")
#> Error: Cannot open "path/to/nodes.shp"; The file doesn't seem to exist.