27#ifndef OPENSWMM_ENGINE_SPATIAL_FRAME_HPP
28#define OPENSWMM_ENGINE_SPATIAL_FRAME_HPP
106 bool is_geographic =
false;
189 if (point) coupling_points.push_back(point);
196 return !coupling_points.empty();
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 Controls.cpp:24
Spatial frame containing CRS and georeferenced coordinates.
Definition SpatialFrame.hpp:82
std::vector< double > link_x
Link centroid X coordinates.
Definition SpatialFrame.hpp:123
void register_coupling_point(ICouplingPoint *point)
Register a 2D coupling point.
Definition SpatialFrame.hpp:188
std::vector< double > subcatch_x
Subcatchment centroid X.
Definition SpatialFrame.hpp:133
std::vector< double > node_x
Node X coordinates (easting or longitude).
Definition SpatialFrame.hpp:113
std::vector< double > gage_x
Gage X coordinates.
Definition SpatialFrame.hpp:163
std::vector< double > gage_y
Gage Y coordinates.
Definition SpatialFrame.hpp:166
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:156
bool has_2d_coupling() const noexcept
Returns true if any 2D coupling points are registered.
Definition SpatialFrame.hpp:195
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:143
std::vector< double > link_y
Link centroid Y coordinates.
Definition SpatialFrame.hpp:126
std::vector< std::vector< double > > subcatch_polygon_x
Per-subcatchment polygon X vertices.
Definition SpatialFrame.hpp:153
std::vector< double > node_y
Node Y coordinates (northing or latitude).
Definition SpatialFrame.hpp:116
std::vector< double > subcatch_y
Subcatchment centroid Y.
Definition SpatialFrame.hpp:136
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:146
std::vector< ICouplingPoint * > coupling_points
Registered 2D coupling points.
Definition SpatialFrame.hpp:182