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
mesh2dresultsexport.cpp File Reference
#include "io/mesh2dresultsexport.h"
#include "io/gdaldrivers.h"
#include "layers/meshspatialgrid.h"
#include "layers/swmm2dresultslayer.h"
#include "mesh/meshcellgeom.h"
#include "mesh/meshresult.h"
#include "mesh/naturalnbinterpolator.h"
#include <gdal_priv.h>
#include <ogrsf_frmts.h>
#include <cpl_conv.h>
#include <cpl_error.h>
#include <cpl_string.h>
#include <nanoflann.hpp>
#include <QDateTime>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QTextStream>
#include <algorithm>
#include <array>
#include <cmath>
#include <limits>
#include <memory>
Include dependency graph for mesh2dresultsexport.cpp:

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::io
 

Functions

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".
 
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.
 
bool openswmmvis::io::exportMesh2DResults (const Mesh2DExportInputs &inputs, const Mesh2DExportOptions &options, const Mesh2DExportProgress &progress, Mesh2DExportReport *report)
 Run the export described by options against inputs.
 

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

Variable Documentation

◆ adaptor

PtAdaptor adaptor

◆ adj

CellAdjacency adj

◆ area

std::vector<double> area

model units²

◆ cell

std::vector<int> cell

◆ cells

std::vector<mesh::MeshTriangle> cells

◆ cellSize

double cellSize = 1.0

◆ cx

std::vector<double> cx

◆ cy

std::vector<double> cy

area centroid per cell

◆ dx

std::vector<float> dx

◆ dy

std::vector<float> dy

Green–Gauss only, parallel to cell

◆ grid

◆ h

int h = 0

◆ hasMax

bool hasMax = false

◆ k

int k = 8

◆ kd

std::unique_ptr<Kd2> kd

◆ len

std::vector<double> len

◆ max

std::vector<float> max

empty unless hasMax

◆ method

Mesh2DInterp method = Mesh2DInterp::GreenGauss

◆ n

std::size_t n = 0

◆ nbr

std::vector<int> nbr

◆ nn

◆ nx

std::vector<double> nx

◆ ny

std::vector<double> ny

◆ owner

std::vector<int> owner

containing cell per pixel (-1 = outside)

◆ power

double power = 2.0

◆ start

std::vector<int> start

size = pixels + 1

◆ steps

std::vector<std::vector<float> > steps

one per selected time step

◆ sub

std::vector<std::array<int, 3> > sub

sub-triangle fan

◆ subStart

std::vector<int> subStart

CSR cell → fan slice.

◆ var

Mesh2DVariable var = Mesh2DDepth

◆ verts

QVector<mesh::MeshVertex> verts

◆ w

std::vector<float> w = 0

◆ xmin

double xmin = 0.0

◆ xs

const double* xs = nullptr

◆ ymax

double ymax = 0.0

◆ ys

const double* ys = nullptr

◆ zMean

std::vector<double> zMean

mean bed elevation, model units