ras2cng.results¶
ras2cng.results
¶
Results export functions for ras2cng.
AuxiliaryResultTable
dataclass
¶
Attribute-only HDF result table and its browser geometry join.
Source code in ras2cng/results.py
extract_auxiliary_result_tables(plan_hdf)
¶
Extract non-mesh result families used by RASMapper Identify.
Source code in ras2cng/results.py
extract_sa2d_structure_summary(plan_hdf, chunk_rows=4096)
¶
Reduce SA/2D connection time series without loading all timesteps.
Source code in ras2cng/results.py
extract_pipe_network_summaries(plan_hdf, chunk_rows=4096)
¶
Reduce every pipe-network result variable by source node/conduit.
Source code in ras2cng/results.py
extract_1d_structure_summary(plan_hdf)
¶
Extract one maximum-value row per 1D structure result location.
Source code in ras2cng/results.py
extract_steady_cross_section_results(plan_hdf)
¶
Extract raw 1D steady-flow cross-section results from a plan HDF.
The returned rows retain their HEC-RAS source identity through
river, reach, node_id, and profile. They intentionally
have no geometry: the browser delivery step joins them to the matching
cross-section feature with that composite identity.
Source code in ras2cng/results.py
extract_unsteady_cross_section_results(plan_hdf, *, chunk_rows=4096)
¶
Extract bounded-memory summaries for raw 1D unsteady XS results.
Source code in ras2cng/results.py
result_variable_slug(variable)
¶
result_variable_index_column(variable)
¶
Return the mesh key column used by a HEC-RAS summary variable.
selected_summary_variables(plan_hdf, variables=None)
¶
List available variables, optionally restricted by exact name or slug.
Requested variables are matched case-insensitively against the raw HEC-RAS name and the ras2cng slug. Missing requested variables are ignored so one archive profile can be reused across mixed projects.
Source code in ras2cng/results.py
extract_results_variable_no_geometry(plan_hdf, variable, *, round_to='100ms')
¶
Extract one mesh summary variable without constructing geometry.
This avoids the HdfResultsMesh.get_mesh_summary_output() GeoDataFrame path, which builds mesh cell/face geometry internally. It is the preferred path for large archives that store results as DRY attribute tables.
Source code in ras2cng/results.py
extract_results_variable(plan_hdf, variable, *, mesh_cells_gdf=None, geometry_mode='polygon')
¶
Extract one summary variable without retaining other variables in memory.
Source code in ras2cng/results.py
export_results_layer(plan_hdf, output, variable='Maximum Depth', geom_file=None)
¶
Export a single HEC-RAS mesh summary output variable to GeoParquet.
Notes
- ras-commander normalizes the output column names to snake_case. Example: "Maximum Depth" -> "maximum_depth".
- Geometry returned by ras-commander is typically cell/face points. If you pass a
mesh-cell polygon GeoParquet in
geom_file, this function joins values onto polygons.
Source code in ras2cng/results.py
list_available_summary_variables(plan_hdf)
¶
List available 2D mesh summary output variables in a plan HDF.
Source code in ras2cng/results.py
export_all_variables(plan_hdf, output_dir, geom_file=None)
¶
Export all available 2D mesh summary variables to separate GeoParquet files.
Source code in ras2cng/results.py
merge_all_variables(plan_hdf, mesh_cells_gdf=None, variables=None, geometry_mode='polygon')
¶
Extract and merge all summary variables into a single GeoDataFrame.
Each variable becomes rows distinguished by a layer column with the
snake_case variable name. When results are points and mesh_cells_gdf
is provided, values are joined onto the polygon geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plan_hdf
|
Path
|
Path to |
required |
mesh_cells_gdf
|
Optional[GeoDataFrame]
|
Optional mesh cell polygons for spatial join |
None
|
Returns:
| Type | Description |
|---|---|
Optional[GeoDataFrame]
|
A merged GeoDataFrame with |