nwm_region_mgr.utils.hydrofabric_utils.find_gages_within_buffer#

nwm_region_mgr.utils.hydrofabric_utils.find_gages_within_buffer(gage_file, gage_id_col, buffer, gdf=None, hydrofabric_file=None, id=None)[source]#

Find gages within a buffer zone around the hydrofabric.

Return type:

tuple[list, list, GeoSeries]

Parameters:
  • gage_file – path to the donor gage file containing gage_id, longitude, and latitude

  • gage_id_col – column name for gage ID in the gage file

  • buffer – buffer distance in kilometers around the hydrofabric

  • gdf – optional, a GeoDataFrame of hydrofabric polygons (if provided, hydrofabric_file is ignored)

  • hydrofabric_file – optional, path to the hydrofabric file (.gpkg or .shp format)

  • id – optional, identifier for the hydrofabric

Returns:

list of gages within the buffered hydrofabric distances: list of distances from each gage to the hydrofabric centroid gdf_buffered: GeoDataFrame representing the buffered hydrofabric geometry

Return type:

gages