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
openswmmvis::import::FeatureLayerImporter Class Reference

#include <featurelayerimporter.h>

Inheritance diagram for openswmmvis::import::FeatureLayerImporter:
Collaboration diagram for openswmmvis::import::FeatureLayerImporter:

Public Member Functions

 FeatureLayerImporter (GISVectorLayer *source, SWMMModelLayer *target, MapCanvas *canvas, ImportMapping mapping, QObject *parent=nullptr)
 
const ImportMappingmapping () const
 
void setMapping (const ImportMapping &m)
 
SourceSpec sourceSpec () const
 
ModelSnapshot captureModelSnapshot () const
 
ImportPlan execute (const ImportPlan &plan, const std::function< bool(int, int)> &progress={})
 

Static Public Member Functions

static QVector< SourceFeaturereadSourceFeatures (const SourceSpec &spec, QString *errorOut=nullptr)
 

Constructor & Destructor Documentation

◆ FeatureLayerImporter()

openswmmvis::import::FeatureLayerImporter::FeatureLayerImporter ( GISVectorLayer source,
SWMMModelLayer target,
MapCanvas canvas,
ImportMapping  mapping,
QObject *  parent = nullptr 
)

Member Function Documentation

◆ captureModelSnapshot()

ModelSnapshot openswmmvis::import::FeatureLayerImporter::captureModelSnapshot ( ) const

MAIN thread — snapshot existing node/link/gage names, types, and geometry from the target layer's engine.

Here is the call graph for this function:

◆ execute()

ImportPlan openswmmvis::import::FeatureLayerImporter::execute ( const ImportPlan plan,
const std::function< bool(int, int)> &  progress = {} 
)

MAIN thread — apply plan as ONE undo macro on the canvas stack. Returns a copy of the plan with engine-level failures downgraded to Error and the executed counts recomputed. progress (optional) receives (done, total) after each item; return false from it to stop pushing further items (already pushed items stay, as one undoable macro).

Here is the call graph for this function:

◆ mapping()

const ImportMapping & openswmmvis::import::FeatureLayerImporter::mapping ( ) const
inline

◆ readSourceFeatures()

QVector< SourceFeature > openswmmvis::import::FeatureLayerImporter::readSourceFeatures ( const SourceSpec spec,
QString *  errorOut = nullptr 
)
static

WORKER-safe — open spec.filePath read-only with its own GDAL handle, iterate features (honoring filter/selection), transform every coordinate source-CRS → model-CRS, and reduce to plain SourceFeatures. On open failure returns an empty list and sets errorOut.

◆ setMapping()

void openswmmvis::import::FeatureLayerImporter::setMapping ( const ImportMapping m)
inline

◆ sourceSpec()

SourceSpec openswmmvis::import::FeatureLayerImporter::sourceSpec ( ) const

MAIN thread — capture the worker inputs from the source layer.

Here is the call graph for this function:

The documentation for this class was generated from the following files: