RasGeomHdf

class rashdf.RasGeomHdf(name: str, **kwargs)

Bases: RasHdf

HEC-RAS Geometry HDF class.

bc_lines() GeoDataFrame

Return 2D mesh area boundary condition lines.

Returns:
GeoDataFrame

A GeoDataFrame containing the 2D mesh area boundary condition lines if they exist.

cross_sections(datetime_to_str: bool = False) GeoDataFrame

Return the model 1D cross sections.

Returns:
GeoDataFrame

A GeoDataFrame containing the model 1D cross sections if they exist.

cross_sections_elevations(round_to: int = 2) DataFrame

Return the model cross section elevation information.

Returns:
DataFrame

A DataFrame containing the model cross section elevation information if they exist.

get_geom_2d_flow_area_attrs() Dict

Return geometry 2d flow area attributes from a HEC-RAS HDF file.

Returns:
dict

Dictionary filled with geometry 2d flow area attributes.

get_geom_attrs() Dict

Return base geometry attributes from a HEC-RAS HDF file.

Returns:
dict

Dictionary filled with base geometry attributes.

get_geom_structures_attrs() Dict

Return geometry structures attributes from a HEC-RAS HDF file.

Returns:
dict

Dictionary filled with geometry structures attributes.

mesh_area_names() List[str]

Return a list of the 2D mesh area names of the RAS geometry.

Returns:
List[str]

A list of the 2D mesh area names (str) within the RAS geometry if 2D areas exist.

mesh_areas() GeoDataFrame

Return 2D flow area perimeter polygons.

Returns:
GeoDataFrame

A GeoDataFrame containing the 2D flow area perimeter polygons if 2D areas exist.

mesh_cell_faces() GeoDataFrame

Return 2D flow mesh cell faces.

Returns:
GeoDataFrame

A GeoDataFrame containing the 2D flow mesh cell faces if 2D areas exist.

mesh_cell_points() GeoDataFrame

Return 2D flow mesh cell points.

Returns:
GeoDataFrame

A GeoDataFrame containing the 2D flow mesh cell points if 2D areas exist.

mesh_cell_polygons() GeoDataFrame

Return 2D flow mesh cell polygons.

Returns:
GeoDataFrame

A GeoDataFrame containing the 2D flow mesh cell polygons if 2D areas exist.

projection() CRS | None

Return the projection of the RAS geometry as a pyproj.CRS object.

Returns:
pyproj.CRS or None

The projection of the RAS geometry.

reference_lines() GeoDataFrame

Return the reference lines geometry and attributes.

Returns:
GeoDataFrame

A GeoDataFrame containing the reference lines if they exist.

reference_lines_names(mesh_name: str | None = None) Dict[str, List[str]] | List[str]

Return reference line names.

If a mesh name is provided, return a list of the reference line names for that mesh area. If no mesh name is provided, return a dictionary of mesh names and their reference line names.

Parameters:
mesh_namestr, optional

The name of the mesh area for which to return reference line names.

Returns:
Union[Dict[str, List[str]], List[str]]

A dictionary of mesh names and their reference line names if mesh_name is None. A list of reference line names for the specified mesh area if mesh_name is not None.

reference_points() GeoDataFrame

Return the reference points geometry and attributes.

Returns:
GeoDataFrame

A GeoDataFrame containing the reference points if they exist.

reference_points_names(mesh_name: str | None = None) Dict[str, List[str]] | List[str]

Return reference point names.

If a mesh name is provided, return a list of the reference point names for that mesh area. If no mesh name is provided, return a dictionary of mesh names and their reference point names.

Parameters:
mesh_namestr, optional

The name of the mesh area for which to return reference point names.

Returns:
Union[Dict[str, List[str]], List[str]]

A dictionary of mesh names and their reference point names if mesh_name is None. A list of reference point names for the specified mesh area if mesh_name is not None.

refinement_regions() GeoDataFrame

Return 2D mesh area refinement regions.

Returns:
GeoDataFrame

A GeoDataFrame containing the 2D mesh area refinement regions if they exist.

river_reaches(datetime_to_str: bool = False) GeoDataFrame

Return the model 1D river reach lines.

Returns:
GeoDataFrame

A GeoDataFrame containing the model 1D river reach lines if they exist.

structures(datetime_to_str: bool = False) GeoDataFrame

Return the model structures.

Parameters:
datetime_to_strbool, optional

If True, convert datetime values to string format (default: False).

Returns:
GeoDataFrame

A GeoDataFrame containing the model structures if they exist.