![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Namespaces | |
| namespace | gdalcaps |
| namespace | rastergeoref |
Classes | |
| struct | CoordinateReference |
| How a 2D result source's XY coordinates relate to the model's CRS. More... | |
| struct | Mesh2DExportInputs |
| The run to export plus the unit / CRS context the source cannot state. More... | |
| struct | Mesh2DExportOptions |
| What to export. Collected by the dialog, consumed by exportMesh2DResults. More... | |
| struct | Mesh2DExportReport |
| What was written, or why nothing was. More... | |
| struct | Mesh2DGridHint |
| What a caller needs to size a raster before running the export. More... | |
| class | Mesh2DH5Reader |
| class | RptParser |
| struct | RptSection |
| struct | SwmmDatState |
| State carried across lines when reading a SWMM .dat timeseries file. More... | |
Typedefs | |
| using | Mesh2DExportProgress = std::function< bool(int done, int total, const QString &what)> |
| Progress sink. Return false to cancel — every file written so far is then deleted, so a cancelled export leaves nothing half-written behind. | |
Enumerations | |
| enum class | Mesh2DExportFormat { Shapefile , GeoPackage , GeoTiff } |
| Output container. Vector formats share one OGR code path. More... | |
| enum class | Mesh2DInterp { NaturalNeighbour , Idw , GreenGauss } |
| How cell-centred values are carried to raster pixels. More... | |
| enum | Mesh2DVariable : unsigned { Mesh2DDepth = 1u << 0 , Mesh2DHead = 1u << 1 , Mesh2DVx = 1u << 2 , Mesh2DVy = 1u << 3 , Mesh2DVmag = 1u << 4 } |
| Exportable fields, as a bitmask. More... | |
Functions | |
| bool | exportMesh2DResults (const Mesh2DExportInputs &inputs, const Mesh2DExportOptions &options, const Mesh2DExportProgress &progress, Mesh2DExportReport *report) |
Run the export described by options against inputs. | |
| Mesh2DGridHint | mesh2DGridHint (IMesh2DSource *source, double unitFactor) |
Mesh extent and a default pixel size for source, so a dialog can show the resulting raster's dimensions before anything is written. | |
| QString | mesh2DVariableKey (Mesh2DVariable variable) |
Lower-case single-word name of variable ("depth", "vmag", …), used for file suffixes, layer names and the sidecar's field column. | |
| QString | mesh2DVariableLabel (Mesh2DVariable variable) |
Human label for variable, e.g. "Water surface elevation". | |
| QChar | guessDelimiter (const QString &sampleLine) |
| Guess the per-row delimiter from a sample line. | |
| bool | tryParseTimestamp (const QString &s, double &jOut, double fallbackBase) |
| Try to parse s as a timestamp into a SWMM Julian date. | |
| bool | parseRow (const QString &line, QChar delim, double &timeJulianOut, std::vector< double > &valuesOut, double hoursSinceStartFallbackBase) |
| Parse one delimited row into a timestamp + N value cells. | |
| bool | parseSwmmDatLine (const QString &line, SwmmDatState &state, double &timeJulianOut, double &valueOut) |
| Parse one line of a SWMM .dat timeseries file. | |
Variables | |
| constexpr float | kMesh2DNoData = -9999.0f |
| NoData written into every raster band (dry / outside the mesh). | |
| constexpr unsigned | kMesh2DMaxVariables = Mesh2DDepth | Mesh2DHead | Mesh2DVmag |
| Maximum fields exist only for these variables (see Mesh2DExportOptions::includeMax). A signed component's maximum is not a meaningful envelope. | |
| using openswmmvis::io::Mesh2DExportProgress = typedef std::function<bool(int done, int total, const QString &what)> |
Progress sink. Return false to cancel — every file written so far is then deleted, so a cancelled export leaves nothing half-written behind.
|
strong |
|
strong |
| enum openswmmvis::io::Mesh2DVariable : unsigned |
| bool openswmmvis::io::exportMesh2DResults | ( | const Mesh2DExportInputs & | inputs, |
| const Mesh2DExportOptions & | options, | ||
| const Mesh2DExportProgress & | progress, | ||
| Mesh2DExportReport * | report | ||
| ) |
Run the export described by options against inputs.
| progress | May be empty; called between units of work. |
| report | Optional; receives the files written, warnings, and the failure reason. |
| QChar openswmmvis::io::guessDelimiter | ( | const QString & | sampleLine | ) |
Guess the per-row delimiter from a sample line.
Counts tab / comma / semicolon occurrences in the line; the highest non-zero count wins. Ties favour tab over comma over semicolon. Defaults to comma when nothing matches.
| Mesh2DGridHint openswmmvis::io::mesh2DGridHint | ( | IMesh2DSource * | source, |
| double | unitFactor | ||
| ) |
Mesh extent and a default pixel size for source, so a dialog can show the resulting raster's dimensions before anything is written.
| QString openswmmvis::io::mesh2DVariableKey | ( | Mesh2DVariable | variable | ) |
Lower-case single-word name of variable ("depth", "vmag", …), used for file suffixes, layer names and the sidecar's field column.
| QString openswmmvis::io::mesh2DVariableLabel | ( | Mesh2DVariable | variable | ) |
Human label for variable, e.g. "Water surface elevation".
| bool openswmmvis::io::parseRow | ( | const QString & | line, |
| QChar | delim, | ||
| double & | timeJulianOut, | ||
| std::vector< double > & | valuesOut, | ||
| double | hoursSinceStartFallbackBase | ||
| ) |
Parse one delimited row into a timestamp + N value cells.
| line | The raw input line (no trailing newline). |
| delim | Delimiter from guessDelimiter(). |
| timeJulianOut | On success, SWMM Julian date for cell 0. |
| valuesOut | Filled with one double per value column; empty / non-numeric cells become NaN. |
| hoursSinceStartFallbackBase | Forwarded to tryParseTimestamp(). |
true iff the timestamp parsed. Value cells may be NaN. | bool openswmmvis::io::parseSwmmDatLine | ( | const QString & | line, |
| SwmmDatState & | state, | ||
| double & | timeJulianOut, | ||
| double & | valueOut | ||
| ) |
Parse one line of a SWMM .dat timeseries file.
Mirrors the engine's table_parseFileLine (legacy/engine/table.c):
; are comments (rejected)<time> <value> where time is either HH:MM[:SS] or numeric hours; value's date is state.lastDateJulian <date> <time> <value>; the parsed date replaces state.lastDateJulian for subsequent lines| line | Raw input line (no trailing newline). |
| state | In/out cache of the most recently parsed date. |
| timeJulianOut | On success, SWMM Julian date for this row. |
| valueOut | On success, the value at this row. |
true iff the line yielded a usable (time, value) pair. Try to parse s as a timestamp into a SWMM Julian date.
| s | The raw cell text (may contain leading/trailing whitespace). |
| jOut | On success, the SWMM Julian date (days since 1899-12-30). |
| fallbackBase | When all dated formats fail, treat s as a number of hours since this base Julian date. Pass NaN to disable the numeric fallback. |
true on success.
|
constexpr |
Maximum fields exist only for these variables (see Mesh2DExportOptions::includeMax). A signed component's maximum is not a meaningful envelope.
|
constexpr |
NoData written into every raster band (dry / outside the mesh).