![]() |
SWMMVis
6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
|
#include "map/mapextent.h"#include <QPointF>#include <QString>#include <QVector>#include <functional>Go to the source code of this file.
Classes | |
| struct | mesh::DTMThinnerLimits |
| Test-injectable resource limits for generatePoints(). More... | |
| struct | mesh::DTMThinnerOptions |
| Parameters for the normal-deviation terrain thinning. More... | |
| class | mesh::DTMThinner |
| Terrain-adaptive Steiner point selector from a DTM raster. More... | |
Namespaces | |
| namespace | mesh |
Typedefs | |
| using | mesh::DTMProgressFn = std::function< bool(double)> |
| Progress/cancel callback for DTMThinner::generatePoints(). | |
Slice AU.5b — terrain-adaptive Steiner point generator.
Algorithm: iterative normal-deviation decimation on the full DTM grid.
Each pass: For every interior active vertex V:
Boundary pixels are NOT special-cased: the sampling grid is offset by half a step from the domain edge so every point is strictly interior, and the domain outline is carried by the PSLG segments instead. All grid points are therefore treated uniformly by the thinning algorithm.
Scaling notes (2026-07-31, banded thinning): • The DEM is read in horizontal strips sized to a fixed byte budget, so peak raster-buffer memory is independent of DEM and domain size. Interpolation is bit-identical to a single whole-bbox read. • Grid points outside the DEM footprint yield NaN and become inactive — they are never edge-clamped into a fabricated elevation. • The thinning GRID is processed in row BANDS bounded by a per-band working-set ceiling (~46 bytes per grid point), so total grid size is unlimited — a 15 GB DEM at native spacing streams through band by band. • Band seams are exact: the decimation is a radius-1 stencil per pass, so each band carries a halo of passes rows per side and emits only its core rows — bit-identical to an untiled run for any finite pass count ≤ kMaxThinningHalo. "(unlimited)" passes are capped at kMaxThinningHalo per band in multi-band mode (deterministic; single-band grids keep true run-to-convergence semantics). • Total retained points are capped (kMaxRetainedPointsDefault); exceeding the cap fails with an actionable message in errorMsg() rather than letting the downstream PSLG/Triangle stage exhaust memory.
Threshold guide (dot product = cos θ): 0.99 → keep bends > ~8° (fine detail) 0.95 → keep bends > ~18° (default — channels, levees, ridges) 0.90 → keep bends > ~26° (coarse — prominent breaks only)