Irregular channel transect geometry and hydraulic tables.
More...
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "headers.h"
Irregular channel transect geometry and hydraulic tables.
- Author
- Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com (OpenSWMM maintenance and extensions)
- Copyright
- Copyright (c) 2026 Caleb Buahin. OpenSWMM contributions only; original EPA SWMM credits are retained.
- License
- Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.
◆ _CRT_SECURE_NO_DEPRECATE
| #define _CRT_SECURE_NO_DEPRECATE |
◆ MAXSTATION
◆ transect_create()
| int transect_create |
( |
int | n | ) |
|
Creates an array of cross-section transects.
- Parameters
-
| [in] | n | Number of transect objects to create. |
- Returns
- An error code.
◆ transect_createStreetTransect()
| void transect_createStreetTransect |
( |
TStreet * | street | ) |
|
Construct hydraulic geometry tables from a one- or two-sided street section.
- Parameters
-
| [in,out] | street | Non-null borrowed street with validated internal-feet geometry, dimensionless slopes and Manning coefficients. Its transect tables and transect roughness are overwritten. |
- Postcondition
- Reuses shared Station/Elev/Nstations and roughness/bank positions, then calls createTables() over the computed elevation range.
- Note
- No allocation or geometry status is returned; caller retains the street.
◆ transect_delete()
| void transect_delete |
( |
void | | ) |
|
Deletes memory allocated for all transects.
◆ transect_readParams()
| int transect_readParams |
( |
int * | count, |
|
|
char * | tok[], |
|
|
int | ntoks ) |
Parse an NC, X1 or GR transect input record.
- Parameters
-
| [in,out] | count | Non-null next-transect index; X1 increments it before assigning new parameters. NC validates the previous transect. |
| [in] | tok | Borrowed ntoks token strings; tok[0] must exist and select a supported record keyword. NC provides Manning values, X1 metadata and scaling, GR elevation/station pairs in authored length units. |
| [in] | ntoks | Available token count, at least one; record-specific minimums and pair completeness are checked. |
- Returns
- Zero on success or an input/geometry error code. Global transect state or count may already have changed before an error return.
- Note
- The active transect and station arrays are module-level state; record order must follow the normal HEC-2-style input sequence.
◆ transect_validate()
| void transect_validate |
( |
int | j | ) |
|
Validates transect data and creates its geometry tables.
- Parameters
-