Skip to contents

Export a section in importation SIC format

Usage

create_section_txt(
  section_name,
  abscissa,
  section_type,
  profile,
  distance_majeur = FALSE,
  singular = FALSE,
  xgeo = NULL,
  ygeo = NULL
)

Arguments

section_name

character, name of the section

abscissa

numeric, abscissa of the section in the reach

section_type

1-length character, type of the section: "T" for Trapezoidal, "A" for Abscissa/Elevation, "L" for Width/Elevation

profile

list or matrix, profile of the section (See details)

distance_majeur

logical or numeric, FALSE for a minor bed section

singular

logical TRUE for a singular section, FALSE for a regular section

Value

character, section description in SIC text import format.

Details

The parameter profile should respect the formats depending on section types. For parametrized section (rectangular, circular, trapezoidal), profile

Examples

# Trapezoidal section
create_section_txt("Trapeze", 0, "T", list(B = 2, S = 1.5, ZF = 100, ZB = 102))
#> Warning: 'x' is NULL so the result will be NULL
#> Error in ans[ypos] <- rep(yes, length.out = len)[ypos]: replacement has length zero
# Rectangular section
create_section_txt("Rectangle", 0, "R", list(B = 2, ZF = 100, ZB = 102))
#> Warning: 'x' is NULL so the result will be NULL
#> Error in ans[ypos] <- rep(yes, length.out = len)[ypos]: replacement has length zero
# Circular section
create_section_txt("Circular", 0, "C", list(R = 0.5, ZF = 100, ZB = 102))
#> Warning: 'x' is NULL so the result will be NULL
#> Error in ans[ypos] <- rep(yes, length.out = len)[ypos]: replacement has length zero