SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
seriesdataexport.cpp File Reference
#include "plot/seriesdataexport.h"
#include "core/swmmdatetime.h"
#include <QDateTime>
#include <QFile>
#include <QFileInfo>
#include <QRegularExpression>
#include <QTextStream>
#include <cmath>
#include <limits>
#include <map>
Include dependency graph for seriesdataexport.cpp:

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::plot
 

Functions

QString openswmmvis::plot::seriesToCsvText (const QVector< ExportSeries > &series)
 Build wide-format CSV text: column 0 = ISO timestamp, one column per series. Rows are the sorted union of all series' timestamps; a cell is empty where its series has no sample (or a non-finite value) at that time.
 
QString openswmmvis::plot::seriesToDatText (const ExportSeries &series)
 Build SWMM .dat text for a single series: ";name" comment line followed by "MM/dd/yyyy HH:mm:ss value" rows. Non-finite values are skipped (SWMM cannot parse them).
 
bool openswmmvis::plot::writeSeriesCsv (const QString &path, const QVector< ExportSeries > &series, QString *errorOut=nullptr)
 Write CSV to path. Returns false and populates errorOut on failure.
 
QStringList openswmmvis::plot::writeSeriesDat (const QString &path, const QVector< ExportSeries > &series, QString *errorOut=nullptr)
 Write .dat file(s). A single series writes exactly path; multiple series write one file each, named "<base>_<sanitized series name>.dat" beside path. Returns the list of files written (empty on failure, with errorOut populated).
 
QString openswmmvis::plot::sanitizedFileToken (const QString &name)
 Reduce a series name to a filesystem-safe token for the multi-series .dat fan-out (non [A-Za-z0-9_-] runs collapse to '_').
 

Detailed Description

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later