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::assignment::raingage Namespace Reference

Classes

struct  GageSite
 A located, distinct rain gage usable as a site. More...
 
struct  GeneratedGage
 
struct  Input
 
struct  NewGroup
 A unit-hydrograph group to create as a copy of source. More...
 
struct  Options
 
struct  Plan
 
struct  Progress
 Shared progress / cancellation for computePlan(). More...
 
struct  RdiiInput
 One [RDII] entry. More...
 
struct  RowPlan
 
struct  SubcatchInput
 
struct  UhGroup
 A unit-hydrograph group: its gage and every row a copy needs. More...
 

Enumerations

enum class  Method {
  Nearest ,
  Interpolated
}
 

Functions

QVector< GageSite > eligibleGages (SWMMModelLayer *layer, QStringList *unlocated, QStringList *coincident)
 Located, distinct gages; fills unlocated / coincident. *.
 
Input gatherInput (SWMMModelLayer *layer, const Options &options)
 Step 1 (GUI thread). Also refreshes rain files, as before. *.
 
Plan computePlan (const Input &input, Progress *progress=nullptr)
 Step 2 (any thread). progress may be null. A cancelled run returns a plan whose error says so. *.
 
QUndoCommand * makeApplyCommand (SWMMModelLayer *layer, MapCanvas *canvas, const Plan &plan, const QString &text)
 Step 3 (GUI thread). The returned command has NOT been run: push it onto an undo stack (which runs it), or call redo() and delete it. Null when the plan changes nothing. *.
 

Enumeration Type Documentation

◆ Method

Enumerator
Nearest 
Interpolated 

Function Documentation

◆ computePlan()

Plan openswmmvis::assignment::raingage::computePlan ( const Input &  input,
Progress *  progress = nullptr 
)

Step 2 (any thread). progress may be null. A cancelled run returns a plan whose error says so. *.

Parameters
[in]inputImmutable snapshot produced by gatherInput(); no live model access occurs.
[in,out]progressOptional shared atomic counters/cancel flag; must outlive this call.
Returns
Deterministic assignment, generated-series and RDII split plan; nonempty error prevents application. Cancellation returns an errored plan.

Suitable for a worker thread; internal chunks may run concurrently. No engine inputs are changed.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ eligibleGages()

QVector< GageSite > openswmmvis::assignment::raingage::eligibleGages ( SWMMModelLayer *  layer,
QStringList *  unlocated,
QStringList *  coincident 
)

Located, distinct gages; fills unlocated / coincident. *.

Parameters
[in]layerBorrowed GUI model layer; unavailable layer/engine returns no sites.
[out]unlocatedOptional list of excluded gages located at the origin.
[out]coincidentOptional list of later gages sharing a quantized site with an earlier one.
Returns
First gage at each eligible site, with engine indexes and native engine coordinates; no ownership transfer of the layer.
Here is the caller graph for this function:

◆ gatherInput()

Input openswmmvis::assignment::raingage::gatherInput ( SWMMModelLayer *  layer,
const Options &  options 
)

Step 1 (GUI thread). Also refreshes rain files, as before. *.

Parameters
[in]layerBorrowed live model layer; call on the GUI thread before launching computation.
[in]optionsMethod, interpolation tolerance and selected object scopes.
Returns
Independent snapshot for computePlan(); nonempty Input::error prevents planning.

Refreshes external rain files and reads engine geometry, source series and prior generated-output claims. Returned values own all worker data.

Here is the call graph for this function:

◆ makeApplyCommand()

QUndoCommand * openswmmvis::assignment::raingage::makeApplyCommand ( SWMMModelLayer *  layer,
MapCanvas *  canvas,
const Plan &  plan,
const QString &  text 
)

Step 3 (GUI thread). The returned command has NOT been run: push it onto an undo stack (which runs it), or call redo() and delete it. Null when the plan changes nothing. *.

Parameters
[in]layerBorrowed target model layer; must remain valid while the command is used.
[in]canvasBorrowed canvas used by the bulk edit to refresh affected views.
[in]planSuccessful plan whose engine names and source records still describe the target model.
[in]textUser-facing undo-stack label.
Returns
Newly allocated command owned by the caller until transferred to an undo stack; nullptr when no edits are required.

Construct and execute on the GUI thread. Pushing onto QUndoStack transfers ownership and executes redo().

Here is the call graph for this function:
Here is the caller graph for this function: