![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Spatial frame containing CRS and georeferenced coordinates. More...
#include <SpatialFrame.hpp>
Public Member Functions | |
| void | register_coupling_point (ICouplingPoint *point) |
| Register a 2D coupling point. | |
| bool | has_2d_coupling () const noexcept |
| Returns true if any 2D coupling points are registered. | |
| void | shrink_to_fit () |
| Release excess vector capacity accumulated during parsing. | |
Public Attributes | |
| std::string | crs |
| CRS specification string. | |
| bool | is_geographic = false |
| True if the CRS represents geographic coordinates (lon/lat). | |
| double | map_x1 = 0.0 |
| Map extent minimum X (left). | |
| double | map_y1 = 0.0 |
| Map extent minimum Y (bottom). | |
| double | map_x2 = 0.0 |
| Map extent maximum X (right). | |
| double | map_y2 = 0.0 |
| Map extent maximum Y (top). | |
| std::string | map_units |
| Map units string from [MAP] UNITS keyword. | |
| std::vector< double > | node_x |
| Node X coordinates (easting or longitude). | |
| std::vector< double > | node_y |
| Node Y coordinates (northing or latitude). | |
| std::vector< double > | link_x |
| Link centroid X coordinates. | |
| std::vector< double > | link_y |
| Link centroid Y coordinates. | |
| std::vector< double > | subcatch_x |
| Subcatchment centroid X. | |
| std::vector< double > | subcatch_y |
| Subcatchment centroid Y. | |
| std::vector< std::vector< double > > | link_vertices_x |
| Per-link X vertices. link_vertices_x[link_idx] is a vector of X coords. | |
| std::vector< std::vector< double > > | link_vertices_y |
| Per-link Y vertices. link_vertices_y[link_idx] is a vector of Y coords. | |
| std::vector< std::vector< double > > | subcatch_polygon_x |
| Per-subcatchment polygon X vertices. | |
| std::vector< std::vector< double > > | subcatch_polygon_y |
| Per-subcatchment polygon Y vertices. | |
| std::vector< double > | gage_x |
| Gage X coordinates. | |
| std::vector< double > | gage_y |
| Gage Y coordinates. | |
| std::vector< ICouplingPoint * > | coupling_points |
| Registered 2D coupling points. | |
Spatial frame containing CRS and georeferenced coordinates.
Coordinates are stored in the CRS specified by the crs field. If crs is empty, coordinates are in model units (as in legacy SWMM).
Arrays are indexed identically to the corresponding SoA data stores (NodeData, LinkData, SubcatchData). Index i in node_x corresponds to node i in NodeData.
|
inlinenoexcept |
Returns true if any 2D coupling points are registered.
|
inline |
Register a 2D coupling point.
| point | Non-owning pointer to a coupling point. |
|
inline |
Release excess vector capacity accumulated during parsing.
| std::vector<ICouplingPoint*> openswmm::SpatialFrame::coupling_points |
Registered 2D coupling points.
2D components register ICouplingPoint objects here to establish exchange at specific 1D objects. The 1D engine calls exchange_to_2d() and receive_from_2d() at each timestep if any coupling points are registered.
Not owned — the 2D component manages the lifetime of these objects.
| std::string openswmm::SpatialFrame::crs |
CRS specification string.
EPSG code (e.g., "EPSG:4326") or PROJ string (e.g., "+proj=utm +zone=33 +datum=WGS84"). Empty string means no CRS is specified (legacy behavior).
Set from the CRS key in [OPTIONS]:
| std::vector<double> openswmm::SpatialFrame::gage_x |
Gage X coordinates.
| std::vector<double> openswmm::SpatialFrame::gage_y |
Gage Y coordinates.
| bool openswmm::SpatialFrame::is_geographic = false |
True if the CRS represents geographic coordinates (lon/lat).
Used for distance calculations and 2D coupling.
| std::vector<std::vector<double> > openswmm::SpatialFrame::link_vertices_x |
Per-link X vertices. link_vertices_x[link_idx] is a vector of X coords.
| std::vector<std::vector<double> > openswmm::SpatialFrame::link_vertices_y |
Per-link Y vertices. link_vertices_y[link_idx] is a vector of Y coords.
| std::vector<double> openswmm::SpatialFrame::link_x |
Link centroid X coordinates.
| std::vector<double> openswmm::SpatialFrame::link_y |
Link centroid Y coordinates.
| std::string openswmm::SpatialFrame::map_units |
Map units string from [MAP] UNITS keyword.
Typically NONE, FEET, METERS, or DEGREES.
| double openswmm::SpatialFrame::map_x1 = 0.0 |
Map extent minimum X (left).
| double openswmm::SpatialFrame::map_x2 = 0.0 |
Map extent maximum X (right).
| double openswmm::SpatialFrame::map_y1 = 0.0 |
Map extent minimum Y (bottom).
| double openswmm::SpatialFrame::map_y2 = 0.0 |
Map extent maximum Y (top).
| std::vector<double> openswmm::SpatialFrame::node_x |
Node X coordinates (easting or longitude).
| std::vector<double> openswmm::SpatialFrame::node_y |
Node Y coordinates (northing or latitude).
| std::vector<std::vector<double> > openswmm::SpatialFrame::subcatch_polygon_x |
Per-subcatchment polygon X vertices.
| std::vector<std::vector<double> > openswmm::SpatialFrame::subcatch_polygon_y |
Per-subcatchment polygon Y vertices.
| std::vector<double> openswmm::SpatialFrame::subcatch_x |
Subcatchment centroid X.
| std::vector<double> openswmm::SpatialFrame::subcatch_y |
Subcatchment centroid Y.