27#ifndef OPENSWMM_ENGINE_SPATIAL_FRAME_HPP
28#define OPENSWMM_ENGINE_SPATIAL_FRAME_HPP
Abstract coupling point between a 1D SWMM object and a 2D mesh cell.
Definition SpatialFrame.hpp:49
virtual ~ICouplingPoint()=default
virtual void exchange_to_2d(double value)=0
Exchange 1D state to the 2D component at this point.
virtual int object_index() const noexcept=0
Index of the 1D SWMM object (node, link, or subcatch index).
virtual double receive_from_2d() const =0
Receive 2D state from the 2D component at this point.
virtual const char * object_type() const noexcept=0
Type: "NODE", "LINK", or "SUBCATCH".
Definition NodeCoupling.cpp:15
Spatial frame containing CRS and georeferenced coordinates.
Definition SpatialFrame.hpp:82
double map_x2
Map extent maximum X (right).
Definition SpatialFrame.hpp:119
std::vector< double > link_x
Link centroid X coordinates.
Definition SpatialFrame.hpp:145
void shrink_to_fit()
Release excess vector capacity accumulated during parsing.
Definition SpatialFrame.hpp:224
void register_coupling_point(ICouplingPoint *point)
Register a 2D coupling point.
Definition SpatialFrame.hpp:210
std::vector< double > subcatch_x
Subcatchment centroid X.
Definition SpatialFrame.hpp:155
std::vector< double > node_x
Node X coordinates (easting or longitude).
Definition SpatialFrame.hpp:135
std::vector< double > gage_x
Gage X coordinates.
Definition SpatialFrame.hpp:185
std::vector< double > gage_y
Gage Y coordinates.
Definition SpatialFrame.hpp:188
std::string crs
CRS specification string.
Definition SpatialFrame.hpp:100
std::vector< std::vector< double > > subcatch_polygon_y
Per-subcatchment polygon Y vertices.
Definition SpatialFrame.hpp:178
double map_x1
Map extent minimum X (left).
Definition SpatialFrame.hpp:113
bool has_2d_coupling() const noexcept
Returns true if any 2D coupling points are registered.
Definition SpatialFrame.hpp:217
bool is_geographic
True if the CRS represents geographic coordinates (lon/lat).
Definition SpatialFrame.hpp:106
std::vector< std::vector< double > > link_vertices_x
Per-link X vertices. link_vertices_x[link_idx] is a vector of X coords.
Definition SpatialFrame.hpp:165
std::vector< double > link_y
Link centroid Y coordinates.
Definition SpatialFrame.hpp:148
std::vector< std::vector< double > > subcatch_polygon_x
Per-subcatchment polygon X vertices.
Definition SpatialFrame.hpp:175
double map_y1
Map extent minimum Y (bottom).
Definition SpatialFrame.hpp:116
std::vector< double > node_y
Node Y coordinates (northing or latitude).
Definition SpatialFrame.hpp:138
double map_y2
Map extent maximum Y (top).
Definition SpatialFrame.hpp:122
std::string map_units
Map units string from [MAP] UNITS keyword.
Definition SpatialFrame.hpp:128
std::vector< double > subcatch_y
Subcatchment centroid Y.
Definition SpatialFrame.hpp:158
std::vector< std::vector< double > > link_vertices_y
Per-link Y vertices. link_vertices_y[link_idx] is a vector of Y coords.
Definition SpatialFrame.hpp:168
std::vector< ICouplingPoint * > coupling_points
Registered 2D coupling points.
Definition SpatialFrame.hpp:204