Skip to contents

This function will instersect all segments with SAFRAN grid in order to assign up to 8 SAFRAN grid to each segments, with length proportion of the segment in each grid.

Usage

TNETshape_getSafran(path_segments, path_SafranGRID, export_file)

Arguments

path_segments

string Path to the shapefile with segments to merge.

path_SafranGRID

string Path to the shapefile with all SAFRAN GRID IDs.

export_file

string Path to the shapefile with results to create.

Value

None.

Details

This function use sf::st_intersection() to intersect the SAFRAN grid shapefile and the river segments in order to extract the length ratio of every segments in each Safran GRID.

The number maximum of SAFRAN grid that 1 segment can cross is 8 (limit fixed by T-NET)

Examples

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