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
featurelayerimporter.h File Reference
#include "ui/dialogs/import/importmapping.h"
#include "ui/dialogs/import/importplan.h"
#include "ui/dialogs/import/importplanning.h"
#include <QObject>
#include <QSet>
#include <QString>
#include <functional>
Include dependency graph for featurelayerimporter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmmvis::import::SourceSpec
 
class  openswmmvis::import::FeatureLayerImporter
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::import
 

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

FEATURE_LAYER_TO_SWMM_IMPORT — controller between the import dialog (view) and the model side (GISVectorLayer source, SWMMModelLayer target). Splits the work into three phases so the dialog can run the dry run off the GUI thread (MeshGenerationDialog idiom):

  1. sourceSpec() / captureModelSnapshot() — MAIN thread; reads the layers/engine into plain data.
  2. readSourceFeatures() [static] + buildImportPlan() [pure, see importplanning.h] — WORKER-safe; opens its own GDAL dataset so the canvas's OGR handle (and its spatial filter) is untouched.
  3. execute() — MAIN thread; pushes one undo macro of existing Add*Commands + SetAdapterPropertiesCommand / geometry commands.

No widget dependencies — unit-testable headless.