Street cross-section geometry and hydraulic properties.
More...
#include <stdlib.h>
#include "headers.h"
|
| int | street_create (int nStreets) |
| | Allocate zero-initialized street cross-section definitions.
|
| |
| void | street_delete () |
| | Deletes the collection of Street objects.
|
| |
| int | street_readParams (char *tok[], int ntoks) |
| | Parse a street cross section and construct its hydraulic transect tables.
|
| |
| double | street_getExtentFilled (int link) |
| | Inspect the high-end depth or area of a street conduit.
|
| |
Street cross-section geometry and hydraulic properties.
- 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 |
◆ street_create()
| int street_create |
( |
int | nStreets | ) |
|
Allocate zero-initialized street cross-section definitions.
- Parameters
-
| [in] | nStreets | Nonnegative requested street count. |
- Returns
- Zero on success, ERR_MEMORY when calloc returns NULL.
- Postcondition
- Resets Street and Nobjects[STREET], then assigns the new array/count on success. The project owns the allocation and street_delete() releases it.
- Precondition
- Any earlier Street allocation has been released before this call.
◆ street_delete()
Deletes the collection of Street objects.
◆ street_getExtentFilled()
| double street_getExtentFilled |
( |
int | link | ) |
|
Inspect the high-end depth or area of a street conduit.
- Parameters
-
| [in] | link | Valid street conduit link index. |
- Returns
- Maximum endpoint node depth in feet for dynamic-wave routing, otherwise maximum conduit endpoint flow area in square feet. Returns zero when the cross-section transect index is negative.
- Note
- The result is a dimensional depth/area, not a normalized fullness ratio.
◆ street_readParams()
| int street_readParams |
( |
char * | tok[], |
|
|
int | ntoks ) |
Parse a street cross section and construct its hydraulic transect tables.
- Parameters
-
| [in] | tok | Borrowed ntoks non-null token strings: ID, crown width, curb height, cross slope, road n, then optional gutter/backing parameters. Lengths are authored ft/m and slopes are percentages. |
| [in] | ntoks | Number of tokens; at least five required, with complete backing slope/roughness data required when backing width is positive. |
- Returns
- Zero on success or an input error code for missing, unknown or invalid numeric items; error_setInpError stores the diagnostic token.
- Postcondition
- Stores Street properties in feet and dimensionless slope fractions and calls transect_createStreetTransect(). ID may be set before a later error.