43#ifndef OPENSWMM_ENGINE_SPATIAL_FRAME_HPP
44#define OPENSWMM_ENGINE_SPATIAL_FRAME_HPP
Abstract coupling point between a 1D SWMM object and a 2D mesh cell.
Definition SpatialFrame.hpp:65
virtual ~ICouplingPoint()=default
Destroy the concrete coupling point through its interface.
virtual void exchange_to_2d(double value)=0
Deliver a 1D-side sample to the concrete coupling implementation.
virtual int object_index() const noexcept=0
Identify the referenced 1D object within its type-specific table.
virtual double receive_from_2d() const =0
Read the sample provided by the concrete 2D coupling implementation.
virtual const char * object_type() const noexcept=0
Identify the referenced 1D object category.
Definition ExchangeLaw.hpp:60
Spatial frame containing CRS and georeferenced coordinates.
Definition SpatialFrame.hpp:123
double map_x2
Map extent maximum X (right).
Definition SpatialFrame.hpp:160
std::vector< double > link_x
Link centroid X coordinates.
Definition SpatialFrame.hpp:192
void shrink_to_fit()
Request capacity reduction for coordinate and vertex arrays.
Definition SpatialFrame.hpp:282
void register_coupling_point(ICouplingPoint *point)
Append a borrowed coupling point without deduplication.
Definition SpatialFrame.hpp:263
std::vector< double > subcatch_x
Subcatchment centroid X.
Definition SpatialFrame.hpp:202
std::vector< double > node_x
Node X coordinates (easting or longitude).
Definition SpatialFrame.hpp:176
std::vector< double > gage_x
Gage X coordinates.
Definition SpatialFrame.hpp:233
std::vector< double > gage_y
Gage Y coordinates.
Definition SpatialFrame.hpp:236
std::string crs
CRS specification string.
Definition SpatialFrame.hpp:141
std::vector< std::vector< double > > subcatch_polygon_y
Per-subcatchment polygon Y vertices.
Definition SpatialFrame.hpp:226
double map_x1
Map extent minimum X (left).
Definition SpatialFrame.hpp:154
bool has_2d_coupling() const noexcept
Check whether the registration vector contains any entries.
Definition SpatialFrame.hpp:273
bool is_geographic
True if the CRS represents geographic coordinates (lon/lat).
Definition SpatialFrame.hpp:147
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:212
std::vector< double > link_y
Link centroid Y coordinates.
Definition SpatialFrame.hpp:195
std::vector< std::vector< double > > subcatch_polygon_x
Per-subcatchment X vertices. Multiple rings are concatenated with explicit closures; the final ring m...
Definition SpatialFrame.hpp:223
std::vector< uint8_t > node_has_xy
G-X2 (2026-09-19): 1 when the node's coordinates were authored ([COORDINATES], the GeoPackage geometr...
Definition SpatialFrame.hpp:185
double map_y1
Map extent minimum Y (bottom).
Definition SpatialFrame.hpp:157
std::vector< double > node_y
Node Y coordinates (northing or latitude).
Definition SpatialFrame.hpp:179
double map_y2
Map extent maximum Y (top).
Definition SpatialFrame.hpp:163
std::string map_units
Map units string from [MAP] UNITS keyword.
Definition SpatialFrame.hpp:169
std::vector< double > subcatch_y
Subcatchment centroid Y.
Definition SpatialFrame.hpp:205
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:215
std::vector< ICouplingPoint * > coupling_points
Registered 2D coupling points.
Definition SpatialFrame.hpp:252