Create the shapefile to be read by T-NET with good columns names
Arguments
- shapefile
Path to the shapefile with all segments info (see details for all column names)
- shapefileExport
Path where the resulting shapefile will be written
- columns.toKeep
Column to keep from the shapefile. These columns will not be use by T-NET, but can be useful in other function (as
TNET_modifyVeget()
)
Details
Table of Column Mappings:
Columns name in shapefile | Rename for T-NET | Use in T-NET | info |
gid_new | gid | ALL | ID of the Topage segment |
ID_ND_FIN | ND_INI | ALL | ID of the final node of the segment. |
ID_ND_INI | ND_FIN | ALL | ID of the initial node of the segment. |
RG_PCT_VEG | vegPctL | SF | Percentage of the river segment covered by vegetation on left bank |
RD_PCT_VEG | vegPctR | SF | Percentage of the river segment covered by vegetation on right bank |
RG_H_MOY | vegHL | SF | Mean High of vegetation on left bank |
RD_H_MOY | vegHR | SF | Mean High of vegetation on right bank |
Xcentr | X | SF | X coordinate of the center of the segment (degrees) |
Ycentr | Y | SF | Y coordinate of the center of the segment (degrees) |
phi_deg | SF | Orientation of the segment in degrees (North = 0°, South = 180°, East = 90°, Weast = 270°) | |
Longueur_m | L_km | ALL | Length of the segment (converted in km) |
ID_M_1 | id_M_1 | SAFRAN | ID of the SAFRAN grid n°1 where the segment is located |
ID_M_2 | id_M_2 | SAFRAN | ID of the SAFRAN grid n°2 where the segment is located |
ID_M_3 | id_M_3 | SAFRAN | ID of the SAFRAN grid n°3 where the segment is located |
ID_M_4 | id_M_4 | SAFRAN | ID of the SAFRAN grid n°4 where the segment is located |
ID_M_5 | id_M_5 | SAFRAN | ID of the SAFRAN grid n°5 where the segment is located |
ID_M_6 | id_M_6 | SAFRAN | ID of the SAFRAN grid n°6 where the segment is located |
ID_M_7 | id_M_7 | SAFRAN | ID of the SAFRAN grid n°7 where the segment is located |
ID_M_8 | id_M_8 | SAFRAN | ID of the SAFRAN grid n°8 where the segment is located |
Rap_M_1 | SAFRAN | Part of the segment located in SAFRAN grid n°1 | |
Rap_M_2 | SAFRAN | Part of the segment located in SAFRAN grid n°2 | |
Rap_M_3 | SAFRAN | Part of the segment located in SAFRAN grid n°3 | |
Rap_M_4 | SAFRAN | Part of the segment located in SAFRAN grid n°4 | |
Rap_M_5 | SAFRAN | Part of the segment located in SAFRAN grid n°5 | |
Rap_M_6 | SAFRAN | Part of the segment located in SAFRAN grid n°6 | |
Rap_M_7 | SAFRAN | Part of the segment located in SAFRAN grid n°7 | |
Rap_M_8 | SAFRAN | Part of the segment located in SAFRAN grid n°8 |
See also
For columns needed by T-NET, you can see the T-NET Wiki here: https://forgemia.inra.fr/guillaume.hevin/t-net/-/wikis/Configuration-file-tconf/shapefile, TNET_initializeSim()
, TNET_modifyVeget()
Examples
############################################################
## Using this function with TNET_initializeSim() function ##
############################################################
infoSimu <- TNET_initializeSim(...)
#> Error: '...' used in an incorrect context
TNET_createShape(shapefile = infoSimu$TOPAGE_shape,
shapefileExport = infoSimu$shapeName)
#> Error: object 'infoSimu' not found
# If a vegetation modification is needed
# TNET_modifyVeget(infoSimu$shapeName,...)