wolfhece.irm_qdf ================ .. py:module:: wolfhece.irm_qdf .. autoapi-nested-parse:: Author: HECE - University of Liege, Pierre Archambeau Date: 2024 Copyright (c) 2024 University of Liege. All rights reserved. This script and its content are protected by copyright law. Unauthorized copying or distribution of this file, via any medium, is strictly prohibited. Module Contents --------------- .. py:data:: Montana_a1 :value: 'a1' .. py:data:: Montana_a2 :value: 'a2' .. py:data:: Montana_a3 :value: 'a3' .. py:data:: Montana_b1 :value: 'b1' .. py:data:: Montana_b2 :value: 'b2' .. py:data:: Montana_b3 :value: 'b3' .. py:data:: RT2 :value: '2' .. py:data:: RT5 :value: '5' .. py:data:: RT10 :value: '10' .. py:data:: RT15 :value: '15' .. py:data:: RT20 :value: '20' .. py:data:: RT25 :value: '25' .. py:data:: RT30 :value: '30' .. py:data:: RT40 :value: '40' .. py:data:: RT50 :value: '50' .. py:data:: RT75 :value: '75' .. py:data:: RT100 :value: '100' .. py:data:: RT200 :value: '200' .. py:data:: RT .. py:data:: freqdep .. py:data:: freqndep .. py:data:: dur10min :value: '10 min' .. py:data:: dur20min :value: '20 min' .. py:data:: dur30min :value: '30 min' .. py:data:: dur1h :value: '1 h' .. py:data:: dur2h :value: '2 h' .. py:data:: dur3h :value: '3 h' .. py:data:: dur6h :value: '6 h' .. py:data:: dur12h :value: '12 h' .. py:data:: dur1d :value: '1 d' .. py:data:: dur2d :value: '2 d' .. py:data:: dur3d :value: '3 d' .. py:data:: dur4d :value: '4 d' .. py:data:: dur5d :value: '5 d' .. py:data:: dur7d :value: '7 d' .. py:data:: dur10d :value: '10 d' .. py:data:: dur15d :value: '15 d' .. py:data:: dur20d :value: '20 d' .. py:data:: dur25d :value: '25 d' .. py:data:: dur30d :value: '30 d' .. py:data:: durationstext .. py:data:: durations .. py:data:: durationsd .. py:data:: durations .. py:data:: durations_seconds .. py:class:: MontanaIRM(coeff: pandas.DataFrame, time_bounds=None) Classe pour la gestion des relations de Montana pour les précipitations .. py:attribute:: coeff .. py:method:: get_ab(dur, T) Get the Montana coefficients for a given duration and return period :param dur: the duration, in minutes :param T: the return period, in years .. py:method:: get_meanrain(dur, T, ab=None) Get the mean rain for a given duration and return period Montana formula is i = a * dur^(-b) where a and b are the Montana coefficients for the given duration and return period Unity of i is [mm/h] and dur is in [minutes] :param dur: the duration, in minutes :param T: the return period, in years :param ab: the Montana coefficients :return: the mean rain in [mm/h] .. py:method:: get_instantrain(dur, T, ab=None) Get the instantaneous rain for a given duration and return period :param dur: the duration, in minutes :param T: the return period, in years :param ab: the Montana coefficients :return: the instantaneous rain in [mm/h] .. py:method:: get_quantityrain(dur, T) Get the quantity of rain for a given duration and return period. The quantity of rain is the mean rain multiplied by the duration expressed in hours (dur/60) to convert it from [mm/h] to [mm] :param dur: the duration, in minutes :param T: the return period, in years :return: the quantity of rain in [mm] .. py:method:: get_delta_quantityrain(dur_start, dur_end, T) Get the difference in quantity of rain between two durations for a given return period. :param dur_start: the starting duration, in minutes :param dur_end: the ending duration, in minutes :param T: the return period, in years :return: the difference in quantity of rain in [mm] .. py:method:: get_delta_meanrain(dur_start, dur_end, T) Get the difference in mean rain between two durations for a given return period. :param dur_start: the starting duration, in minutes :param dur_end: the ending duration, in minutes :param T: the return period, in years :return: the difference in mean rain in [mm/h] .. py:method:: get_hyetogram_Chicago(total_duration, T, r: Literal['centered', 'left', 'right'] = 'centered') Get the Chicoago hyetogram for a given return period, a total duration and a decentration coefficient. The return values are x and y, where x is the starting time of each step of the hyetogram in minutes and y is the intensity of rain for each step of the hyetogram in [mm/h]. x must be interpreted as [x_i, x_{i+1}[ for each step i of the hyetogram, and the intensity y_i is the intensity of rain during this step. The hyetogram is built as follows: - In centered mode, the peak is located at the middle of the hyetogram and has a duration of 10 minutes - In left mode, the peak is located at the beginning of the hyetogram and has a duration of 10 minutes - In right mode, the peak is located at the end of the hyetogram and has a duration of 10 minutes - The intensity is calculated using the Montana coefficients and the mean rain, to ensure the total quantity of rain is correct - The time step is 5 minutes :param total_duration: the total duration of the hyetogram, in minutes (must be greater than 10 minutes and a multiple of 5 minutes) :param T: the return period in years :param r: Decentration mode, either 'centered', 'left' or 'right' :return: x: the starting time of each step of the hyetogram in minutes, y: the intensity of rain for each step of the hyetogram in [mm/h] .. py:method:: get_hyetogram_Chicago_rvar(total_duration, T, r: float = 0.5, timestep: float = 5.0, peak_duration: float = 10.0) Get the Chicoago hyetogram for a given return period, a total duration and a decentration coefficient. The return values are x and y, where x is the starting time of each step of the hyetogram in minutes and y is the intensity of rain for each step of the hyetogram in [mm/h]. x must be interpreted as [x_i, x_{i+1}[ for each step i of the hyetogram, and the intensity y_i is the intensity of rain during this step. The hyetogram is built as follows: - The peak is located at (total_duration * r) and has a duration of peak_duration minutes - The intensity is calculated using the Montana coefficients and the mean rain, to ensure the total quantity of rain is correct - The time step is parameterizable but cosntant for the whole hyetogram, so for example if the time step is 5 minutes, the intensity is calculated every 5 minutes and is constant during these 5 minutes. - if r is not in [0,1,0.5], the hyetogram is computed step-by-step, by alternating steps on the right and left of the peak, to ensure a good resolution around the peak, as the shape of the hyetogram is more important around the peak. :param total_duration: the total duration of the hyetogram, in minutes (must be greater than 10 minutes and a multiple of 5 minutes) :param T: the return period in years :param r: Decentration coefficient, a value in [0, 1] indicating the position of the peak (0 means the peak is at the end of the hyetogram, 1 means the peak is at the beginning of the hyetogram, 0.5 means the peak is in the middle of the hyetogram) :param timestep: the time step for the hyetogram in minutes :param peak_duration: the duration of the peak in minutes :return: x: the starting time of each step of the hyetogram in minutes, y: the intensity of rain for each step of the hyetogram in [mm/h] .. py:method:: get_hyetogram_instant(durmax, T, r=0.5, peak_duration=10) Get the hyetogram for a given return period, a total duration and a decentration coefficient. The decentration coefficient r is a value in [0, 1] that indicates the position of the peak of the hyetogram. If r is 0, the peak is at the end of the hyetogram. If r is 1, the peak is at the beginning of the hyetogram. If r is 0.5, the peak is in the middle of the hyetogram. The time step of the hyetogram is variable and is equal to (1-r) minute before the peak and r minute after the peak, to ensure a good resolution around the peak. The intensity of rain is calculated as the instantaneous rain given by the Montana coefficients, to ensure the correct shape of the hyetogram. The value is picked at the center of each step of the hyetogram, so for example for the step [x_i, x_{i+1}[, the intensity is calculated at (x_i + x_{i+1})/2. The return values are x and y, where x is the starting time of each step of the hyetogram in minutes and y is the intensity of rain for each step of the hyetogram in [mm/h]. x must be interpreted as [x_i, x_{i+1}[ for each step i of the hyetogram, and the intensity y_i is the intensity of rain during this step. The hyetogram is built as follows: - The peak is located at (durmax * r) and has a duration of peak_duration minutes - The peak intensity is the mean rain for a duration of peak_duration minutes and the given return period - The shape is discretized with a step of (1-r) minute before the peak and r minute after the peak - The intensity is calculated using the Montana coefficients and the instantaneous rain for each point of the hyetogram Peak_duration and durmax will be rounded, so the actual peak duration and durmax may be slightly different from the input values. :param durmax: the maximum duration of the hyetogram, in minutes :param T: the return period :param r: Decentration coefficient :param peak_duration: the duration of the peak, in minutes .. py:method:: plot_hyetogram_instant(durmax, T, r=0.5, figax=None) Plot the hyetogram for a given return period :param durmax: the maximum duration of the hyetogram in minutes :param T: the return period :param r: Decentration coefficient .. py:method:: plot_hyetogram_Chicago(total_duration, T, r='centered', figax=None) Plot the Chicago hyetogram for a given return period, a total duration and a decentration coefficient. :param total_duration: the total duration of the hyetogram in minutes :param T: the return period :param r: Decentration mode, either 'centered', 'left' or 'right' .. py:method:: plot_hyetogram_Chicago_rvar(total_duration, T, r=0.5, peak_duration=10, timestep=5, figax=None) Plot the Chicago hyetogram for a given return period, a total duration and a decentration coefficient. :param total_duration: the total duration of the hyetogram in minutes :param T: the return period :param r: Decentration mode, either 'centered', 'left' or 'right' :param peak_duration: the duration of the peak rainfall :param timestep: the time step for the hyetogram .. py:method:: plot_hyetograms_instant(durmax, r=0.5, figax=None) Plot the hyetograms for all return periods :param durmax: the maximum duration of the hyetograms in minutes :param r: Decentration coefficient .. py:method:: animate_hyetogram_Chicago(total_duration, T, r: float = 0.5, timestep: float = 5.0, peak_duration: float = 10.0, interval: int = 400, figsize: tuple = (18, 5)) Create a matplotlib animation showing the progressive construction of a Chicago hyetogram. The animation proceeds as follows: 1. Frame 0: empty axes with labels and IDF envelope 2. Frame 1: the peak bar(s) appear 3. Subsequent frames: bars are added alternating right/left of the peak, exactly mirroring the construction logic of ``get_hyetogram_Chicago_rvar``. 4. Final frame: the complete hyetogram is shown. Three panels are displayed: - Left: IDF curve (Montana) with current duration highlighted - Center: hyetogram under construction - Right: QDF curve (Montana) with cumulative volume of placed bars, showing that the construction respects the total rainfall volume. :param total_duration: the total duration of the hyetogram in minutes :param T: the return period in years :param r: Decentration coefficient in [0, 1] :param timestep: the time step in minutes :param peak_duration: the duration of the peak in minutes :param interval: delay between frames in ms :param figsize: figure size :return: matplotlib.animation.FuncAnimation .. py:class:: Qdf_IRM(store_path=None, code: int = 0, name='', force_import=False, ins: Literal['2018', '2019', '2025', 2018, 2019, 2025] = 2018, localities: wolfhece.ins.Localities = None, dataframe: pandas.DataFrame = None, import_as_needed=False) Gestion des relations QDF calculées par l'IRM Exemple d'utilisation : Pour importer les fichiers depuis le site web de l'IRM meteo.be from wolfhece.irm_qdf import Qdf_IRM qdf = Qdf_IRM(force_import=True) qdf = Il est possible de spécifier le répertoire de stockage des fichiers Excel Par défaut, il s'agit d'un sous-répertoire 'irm' du répertoire courant qui sera créé s'il n'exsiste pas Une fois importé/téléchargé, il est possible de charger une commune sur base de l'INS ou de son nom myqdf = Qdf_IRM(name='Jalhay') Les données sont ensuite disponibles dans les propriétés, qui sont des "dataframes" pandas (https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) : - qdf : les relation Quantité/durée/fréquence - standarddev : l'écart-type de l'erreur - confintlow : la valeur inférieure de l'intervalle de confiance (-2*stddev) - confintup : la valeur supérieure de l'intervalle de confiance (+2*stddev) - montanacoeff : les coeffciients de Montana L'index est le temps (dur10min, dur30min, dur1h, ... -- durationstext) et les colonnes sont les périodes de retour (RT2, RT5, RT10, ... -- RT). Il est par exemple possible d'accéder aux coefficients de Montana via l'une de ces lignes ou une combinaison : display(myqdf.montanacoeff) rt = myqdf.montanacoeff.index display(myqdf.montanacoeff.loc[rt[0]]) display(myqdf.montanacoeff.iloc[0]) display(myqdf.get_Montanacoeff(qdf.RT2)) :param force_import: If True, will download all the IRM's QDF files (about 600). :param import_as_needed: If True and the IRM's QDF file has not yet been downloaded then the file is downloaded. .. py:attribute:: qdf :value: None .. py:attribute:: standarddev :value: None .. py:attribute:: confintlow :value: None .. py:attribute:: confintup :value: None .. py:attribute:: montanacoeff :value: None .. py:attribute:: montana :value: None .. py:attribute:: _code :value: None .. py:attribute:: _name :value: None .. py:attribute:: _qdf_image_table :value: None .. py:attribute:: _qdf_image_plot :value: None .. py:method:: has_data_for_locality() -> bool Has this instance been initialized with data from a locality ? .. py:property:: name .. py:property:: code .. py:property:: code_name .. py:property:: name_code .. py:method:: export_allmontana2xls() Export all Montana coefficients to an Excel file .. py:method:: importfromwebsite(store_path: pathlib.Path = 'irm', verbose: bool = False, waitingtime: float = 0.01, ins: Literal['2018', '2019', '2025', 2018, 2019, 2025] = 2018, ins_code: int = None) :classmethod: Import Excel files for one or all municipalities from the IRM website :param store_path: Where to store the downloaded data. Directory will be created if it doesn't exist. :param verbose: If `True`, will print some progress information. If `False`, will do nothing. If a callable, then will call it with a float in [0, 1]. 0 means nothing downloaded, 1 means everything downloaded. :param waitingtime: How long to wait (in seconds) betwenn the download of each station (will make sure we don't overwhelm IRM's website). :param ins: The year of the INS codes to use. :param code: Restricts the data download to a specific NIS code. `None` means full download. .. py:method:: make(ins_code: int | str, store_path: pathlib.Path = None, verbose: bool = False, waitingtime: float = 0.01, ins: Literal['2018', '2019', '2025', 2018, 2019, 2025] = 2018) :classmethod: Make a Qdf_IRM instance with data from the IRM website :param store_path: Where to store the downloaded data. Directory will be created if it doesn't exist. :param verbose: If `True`, will print some progress information. If `False`, will do nothing. If a callable, then will call it with a float in [0, 1]. 0 means nothing downloaded, 1 means everything downloaded. :param waitingtime: How long to wait (in seconds) betwenn the download of each station (will make sure we don't overwhelm IRM's website). :param ins: The year of the INS codes to use. :param code: Restricts the data download to a specific NIS code. `None` means full download. .. py:method:: _read_csv_or_excel(code='', name='') Lecture des caractéristiques d'une commune depuis le fichier CSV ou Excel associé au code INS :param code: le code INS de la commune :param name: le nom de la commune .. py:method:: _read_csv_or_excel_Montana_only(code='', name='') Lecture des caractéristiques d'une commune depuis le fichier CSV Excel associé au code INS :param code: le code INS de la commune :param name: le nom de la commune .. py:method:: convert_xls2csv(store_path='irm', ins: Literal['2018', '2019', '2025', 2018, 2019, 2025] = 2018) :classmethod: Convert all Excel files to CSV files :param store_path: Where to store the downloaded data. Directory will be created if it doesn't exists. :param ins: The year of the INS codes to use. .. py:method:: plot_idf(T=None, which: Literal['All', 'Montana', 'QDFTable'] = 'All', color=[27.0 / 255.0, 136.0 / 255.0, 245.0 / 255.0]) Plot IDF relations on a new figure :param T : the return period (based on RT constants) :param which : information to plot - 'Montana' - 'QDFTable' - 'All' .. py:method:: plot_qdf(T=None, which: Literal['All', 'Montana', 'QDFTable'] = 'All', color=[27.0 / 255.0, 136.0 / 255.0, 245.0 / 255.0]) Plot QDF relations on a new figure :param T : the return period (based on RT constants) :param which : information to plot - 'Montana' - 'QDFTable' - 'All' .. py:method:: plot_cdf(dur=None) Plot the cdf of the QDF data for a given duration .. py:method:: fit_all() Fit all durations with a Generalized Extreme Value distribution .. py:method:: save_fits_json() Save the fits in a csv file .. py:method:: load_fits_json() Load the fits from a json file .. py:method:: fit_cdf(dur=None, plot=False) Fit the cdf of the QDF data with a Generalized Extreme Value distribution :param dur: the duration to fit :param plot: if True, will plot the cdf with the fit .. py:method:: get_Tfromrain(Q, dur=dur1h) Get the return period for a given quantity of rain :param Q: the quantity of rain :param dur: the duration .. py:method:: get_rainfromT(T, dur=dur1h) Get the quantity of rain for a given return period and duration :param T: the return period :param dur: the duration .. py:method:: get_MontanacoeffforT(return_period) Get the Montana coefficients for a given return period :param return_period: the return period .. py:method:: plot_hyeto(durmax, T, r=0.5) Plot the hyetogram for a given return period :param durmax: the maximum duration of the hyetogram :param T: the return period :param r: the decentration coefficient .. py:method:: plot_hyetos(durmax, r=0.5) Plot the hyetograms for all return periods :param durmax: the maximum duration of the hyetograms :param r: the decentration coefficient .. py:method:: make_image_qdf_plot(T=None, which: Literal['All', 'Montana', 'QDFTable'] = 'All', color=[27.0 / 255.0, 136.0 / 255.0, 245.0 / 255.0]) Create an image of the QDF plot. We use the `matplotlib` library to create a PNG image of the QDF data. The image will be saved in the store path with the name `_qdf_plot.png`. :param durmax: the maximum duration of the hyetograms :param r: Decentration coefficient :return: a PNG image .. py:method:: make_image_qdf_table() Create an image of the QDF data. We use the `dataframe_image` library to create a PNG image of the QDF data. Added style to the DataFrame to make it more readable. :return: a PNG image .. py:method:: make_images() Create all images for the QDF data. .. py:property:: path_image_plot Get the path for the QDF plot image. .. py:property:: path_image_table Get the path for the QDF table image. .. py:class:: QDF_Belgium(store_path='irm', ins: Literal['2018', '2019', '2025', 2018, 2019, 2025] = 2018, force_import: bool = False) Class to manage all QDF data for Belgium .. py:attribute:: localities .. py:attribute:: store_path .. py:attribute:: all :type: dict[int, Qdf_IRM] .. py:method:: make_images() Create all images for all QDF data. .. py:data:: TRANSLATION_HEADER .. py:data:: RE_REFERENCE .. py:class:: Climate_IRM(store_path='irm', ins: Literal['2018', '2019', '2025', 2018, 2019, 2025] = 2018) .. py:attribute:: store_path .. py:attribute:: localities .. py:attribute:: _climate_data .. py:method:: importfromwebsite(store_path='irm', verbose: bool = False, waitingtime: float = 0.01, ins: Literal['2018', '2019', '2025', 2018, 2019, 2025] = 2018, ins_code: int = None, convert=False) :classmethod: Import Excel files for one or all municipalities from the IRM website :param store_path: Where to store the downloaded data. Directory will be created if it doesn't exists. :param verbose: If `True`, will print some progress information. If `False`, will do nothing. If a callable, then will call it with a float in [0, 1]. 0 means nothing downloaded, 1 means everything downloaded. :param waitingtime: How long to wait (in seconds) betwenn the download of each station (will make sure we don't overwhelm IRM's website). :param ins: The year of the INS codes to use. :param code: Restricts the data download to a specific NIS code. `None` means full download. :param convert: Converts the downloaded PDF to Excel files. .. py:method:: _scrap_table(t) :classmethod: Helper method to transform a table represented as a list of list to a pandas DataFrame. .. py:method:: _convert_irm_file(pdf_file: Union[str, pathlib.Path]) :classmethod: Scrap a PDF from IRM into two tables in a single Excel file with two sheets. .. py:data:: PLUVIO_INI :value: 'pluvio.ini' .. py:data:: MATCH_NUM_ZONE_SHAPEFILE_INS_INDEX :value: 'Match_num_zone_shapefile_INS_index.txt' .. py:data:: EXTREME_PRECIP_COMMUNES :value: 'Extreme_rain_ins.txt' .. py:data:: GEOMETRY_MUNICIPALITIES :value: 'PDS__COMMUNES.shp' .. py:class:: QDF_Hydrology(store_path=DATADIR / 'irm_qdf', ini_file: str = PLUVIO_INI, ins: Literal['2018', 2018] = 2018, geometry: str = GEOMETRY_MUNICIPALITIES) Prepare data from IRM website for WOLF hydrology calculations. We need : - pluvio.ini - Match_num_zone_shapefile_INS_index.txt "pluvio.ini" contains the path to the rainfall data files for each locality: - Extreme_precip_communes.txt .. py:attribute:: store_path .. py:attribute:: _data :type: dict[int, Qdf_IRM] .. py:attribute:: _ins :value: 2018 .. py:attribute:: _extreme_file :value: 'Extreme_rain_ins.txt' .. py:attribute:: _nb_lines_extreme_file :value: 0 .. py:attribute:: _nb_cols_extreme_file :value: 0 .. py:attribute:: localities .. py:attribute:: _ini_file :value: 'pluvio.ini' .. py:attribute:: _geometry :value: 'PDS__COMMUNES.shp' .. py:attribute:: _geometry_df :value: None .. py:method:: read_data() Read the data from the ini file and the extreme precipitation file. .. py:method:: download_municipalities_2018(force: bool = False) Download the municipalities shapefile from HECE. :param force: If `True`, will download the file even if it already exists. .. py:method:: create_match_num_zone_shapefile() Create the Match_num_zone_shapefile_INS_index.txt file. This file contains the mapping between the INS codes and the shapefile indices. .. py:method:: create_default_data() Create data from scratch for WOLF hydrology calculations. .. py:method:: create_extreme_precipitation_file() Create the extreme precipitation file for all localities. Each line of the file contains the following data: - INS code - Duration in seconds - Quantity for each return period (RT2, RT5, RT10, RT20, RT50, RT100) .. py:method:: create_ini_file() Create a parameter file for the class .. py:method:: get_all_ins() -> list[int] Get a list of all INS codes. .. py:class:: QDF_Hydrology_Draw(store_path=DATADIR / 'irm_qdf', ins: Literal['2018', 2018] = 2018, idx: str = '', plotted: bool = True, mapviewer=None) Bases: :py:obj:`wolfhece.drawing_obj.Element_To_Draw` .. autoapi-inheritance-diagram:: wolfhece.irm_qdf.QDF_Hydrology_Draw :parts: 1 :private-bases: Class to draw the QDF hydrology data on a map. This class is used to draw the QDF hydrology data on a map using the WOLF hydrology calculations. .. py:attribute:: _qdf_hydrology .. py:attribute:: _scale_factor :value: 1.0 .. py:attribute:: _geometry_zones .. py:attribute:: _geometry_tables .. py:attribute:: _geometry_plots .. py:attribute:: _centroids .. py:attribute:: _show_table :value: False .. py:attribute:: _show_plot :value: False .. py:attribute:: _reload_images :value: True .. py:attribute:: _current_images :value: None .. py:method:: _get_vector_tables(ins: str | int) -> wolfhece.PyVertexvectors.vector Get the vector for a given INS code. .. py:method:: _get_vector_plots(ins: str | int) -> wolfhece.PyVertexvectors.vector Get the vector for a given INS code. .. py:property:: store_path Get the store path for the QDF hydrology data. .. py:method:: _prepare_image_location() Set the default size for the images. .. py:method:: set_images_as_legend(plot_or_table: Literal['plot', 'table'] = 'plot', which: list = None) Set all images in the collection as legend images. .. py:method:: hide_all_images() Hide all images in the collection. .. py:method:: check_plot() Generic function responding to check operation from mapviewer .. py:method:: find_nearest_centroid(x: float, y: float, bounds: tuple[float, float, float, float]) Pick the municipality at the given coordinates. :param x: The x coordinate. :param y: The y coordinate. :return: The name of the municipality or an empty string if not found. .. py:method:: pick_municipality(x: float, y: float, bounds: tuple[float, float, float, float]) Activate plot for the nearest municipality to the given coordinates. .. py:method:: find_centroids_in_polygon(polygon: wolfhece.PyVertexvectors.Polygon) -> list[tuple[wolfhece.PyVertexvectors.vector, str]] Find all centroids in a given polygon. :param polygon: A shapely Polygon object defining the area to search. .. py:method:: find_centroid_in_bounds(bounds: tuple[float, float, float, float]) -> list[tuple[wolfhece.PyVertexvectors.vector, str]] Find all centroids within the given bounds. :param bounds: A tuple of (minx, miny, maxx, maxy) defining the bounding box. .. py:property:: show_plot :type: bool Check if the plot is shown. .. py:property:: show_table :type: bool Check if the table is shown. .. py:method:: scale_images(factor: float = 1.0) Scale the images in the collection by a given factor. :param factor: The scaling factor to apply to the images. .. py:method:: plot(sx=None, sy=None, xmin=None, ymin=None, xmax=None, ymax=None, size=None) Plot the QDF hydrology data on the map.