hydromt.gis.gis_utils.zoom_to_overview_level#

hydromt.gis.gis_utils.zoom_to_overview_level(zoom: int | Tuple[float, str], mask: GeoDataFrame | GeoSeries | None = None, zls_dict: Dict[int, float] | None = None, source_crs: CRS | int | None = None) int | None[source]#

Return overview level of data corresponding to zoom level.

Parameters:
  • zoom (Zoom) – Overview level or tuple with resolution and unit

  • mask (gpd.GeoSeries, optional) – Geometry to determine res if zoom_level or source in degree

  • zls_dict (Dict[int, float], optional) – Dictionary translating overview level to resolution.

  • source_crs (pyproj.CRS, optional) – Source crs to determine res if zoom_level tuple is provided with different unit than source_crs

Returns:

overview_level – Overview level of the data to be used. If no overview levels are defined, None is returned.

Return type:

int or None