ras2cng.results¶
ras2cng.results
¶
Results export functions for ras2cng.
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)
¶
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 |