![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
Slice BI Phase 8.13.7-α / 8.13.43-α — typed-struct carve-out of the BI.2 string-expression data-defined override mechanism. More...
#include <QJsonObject>#include <QString>Go to the source code of this file.
Classes | |
| struct | OpenSWMM::Render::DataDefinedScalar |
| Maps one numeric attribute to a scalar output range. More... | |
Namespaces | |
| namespace | OpenSWMM |
| namespace | OpenSWMM::Render |
Enumerations | |
| enum class | OpenSWMM::Render::DDCurve : int { OpenSWMM::Render::Linear = 0 , OpenSWMM::Render::Sqrt = 1 , OpenSWMM::Render::Log = 2 } |
Interpolation shape for DataDefinedScalar. More... | |
Slice BI Phase 8.13.7-α / 8.13.43-α — typed-struct carve-out of the BI.2 string-expression data-defined override mechanism.
DataDefinedScalar maps one numeric feature attribute (e.g. maxDepth, geom1, area) onto a scalar output range (typically a symbol size or line width in pixels). It carries:
attribute the SWMM attribute key to readvalueMin / Max the attribute-value range to map fromoutMin / Max the output range (e.g. 2..14 px)curve interpolation shape (Linear / Sqrt / Log)evaluate(value) clamps to [valueMin, valueMax], applies the curve, and linearly maps to [outMin, outMax]. NaN / non-finite inputs return outMin defensively.
Storage convention: each SymbolLayer::props may carry an optional "sizeData" (markers) or "widthData" (lines) payload holding a DataDefinedScalar JSON. Renderers that honour data-defined output read the struct, evaluate it against the feature's attribute map, and write the resolved number into props["size"] / props["width"] before returning the SymbolStyle from symbolFor. Painters that already read those keys then see the per-feature override transparently — no painter changes needed for static rendering.
Cross-slice: GUI_IMPLEMENTATION_PLAN.md §L.BI Phase 8.13.7-α