Skip to contents

This function will take results from TNETdiagnostic_pbDrainArea() and fix some of the problems.

Usage

TNETshape_removePbDrainArea(path_segments,export_file, threshold, condition = NULL)

Arguments

path_segments

Path to the segment file

export_file

Path to the created file witout weird segments

threshold

see TNETdiagnostic_pbDrainArea()

condition

Add a condition to the check before the deletion of segments

Value

Shapefile write with export_file name

Details

This function will execute TNETdiagnostic_pbDrainArea() and try to fix drain area problems drain by the following flag:

1 - Threshold_limit

All segments with Threshold_limit will be fixed by deleting all segment upstream, if the segment meets the conditions fixed by condition.

2 - Drain_Topo

This flagged is not fixed yet by this function

3 - DrainArea_NA and DrainSbv_NA

This flagged is not fixed yet by this function

4 - Sbv_bigger_Tot

This flagged is not fixed yet by this function

Examples

TNETshape_removePbDrainArea(path_segments = "path/to/shape.shp",
                            export_file = "path/to/result.shp",
                            threshold = 0.4)
#> Error: Cannot open "path/to/shape.shp"; The file doesn't seem to exist.