Loading...
Searching...
No Matches
mesh::InpMeshWriter::UnitInfo Struct Reference

Unit & provenance metadata written as ;; header comments. More...

#include <mesh/inpmeshwriter.h>

Collaboration diagram for mesh::InpMeshWriter::UnitInfo:

Public Member Functions

 UnitInfo ()
 Construct empty length-unit and source-CRS metadata strings.
 

Public Attributes

QString linearUnitName
 Goes into ;; UNITS: (e.g. "metre", "US survey foot", "SI (m)").
 
QString sourceCrsTag
 Goes into ;; SOURCE_CRS: (e.g. "EPSG:2249").
 

Detailed Description

Unit & provenance metadata written as ;; header comments.

The writer does NOT perform any unit conversion — values are written in whatever unit the caller's mesh already carries (the project CRS linear unit, by convention aligned with the SWMM FLOW_UNITS). The metadata is purely descriptive so the reader / engine can branch on it.

Engine contract (today): [2D_VERTICES] XY is in the project's length unit (feet for US flow units, metres otherwise). Engine multiplies by 0.3048 in SurfaceRouter2D::initialize when the project is US. When the file declares ;; UNITS: SI (m), the engine recognizes the header and skips that multiplication.

Constructor & Destructor Documentation

◆ UnitInfo()

mesh::InpMeshWriter::UnitInfo::UnitInfo ( )
default

Construct empty length-unit and source-CRS metadata strings.

The out-of-line constructor keeps this nested type non-aggregate so default UnitInfo arguments are well-formed. Owns its QString values; no IO, unit discovery, engine query or conversion.

Member Data Documentation

◆ linearUnitName

QString mesh::InpMeshWriter::UnitInfo::linearUnitName

Goes into ;; UNITS: (e.g. "metre", "US survey foot", "SI (m)").

◆ sourceCrsTag

QString mesh::InpMeshWriter::UnitInfo::sourceCrsTag

Goes into ;; SOURCE_CRS: (e.g. "EPSG:2249").


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