Visualization API

The visualization module contains functions for creating static and interactive visualizations of hydro-topographic features.

Visualization modules for hydro-topological features.

plot_interactive_map(site_id: str, raster_paths: list, aoi_path: str = None, Name: list = None, Unit: list = None, vmin: list = None, vmax: list = None, cmap: list = None, opacity: float = None, zoom_start: int = None, output_dirs: Dict[str, Path] | None = None) str[source]

Create an interactive map with multiple raster layers.

Parameters:
  • site_id – Unique identifier for the site

  • raster_paths – List of paths to raster files

  • aoi_path – Path to AOI shapefile/geopackage

  • Name – List of names for each raster layer

  • Unit – List of units for each raster layer

  • vmin – List of minimum values for each raster

  • vmax – List of maximum values for each raster

  • cmap – List of colormaps for each raster

  • opacity – Opacity for raster layers

  • zoom_start – Initial zoom level

  • output_dirs – Dictionary of output directories

Returns:

Path to saved HTML map

plot_static_map(site_id: str, raster_path: str, aoi_path: str = None, cmap: str = 'terrain', vmin: float = None, vmax: float = None, Name: str = None, Unit: str = None, aoi_color: str = None, aoi_linestyle: str = None, aoi_linewidth: int = None, show_grid: bool = None, show_lon_lat: bool = None, show_scale_bar: bool = None, scale_bar_length: int = None, scale_bar_color: str = None, scale_bar_unit: str = None, bbox_buffer: float = None, figsize: tuple = (18, 6), dpi: int = None, output_dirs: Dict[str, Path] | None = None) str[source]

Create a static map visualization of a raster dataset.

Parameters:
  • site_id – Unique identifier for the site

  • raster_path – Path to the raster file to plot

  • aoi_path – Path to the AOI shapefile/geopackage

  • cmap – Matplotlib colormap name

  • vmin – Minimum value for colormap

  • vmax – Maximum value for colormap

  • Name – Name of the feature for the title

  • Unit – Unit for the colorbar label

  • aoi_color – Color for AOI boundary

  • aoi_linestyle – Line style for AOI boundary

  • aoi_linewidth – Line width for AOI boundary

  • show_grid – Whether to show grid lines

  • show_lon_lat – Whether to show lon/lat labels

  • show_scale_bar – Whether to show scale bar

  • scale_bar_length – Length of scale bar

  • scale_bar_color – Color of scale bar

  • scale_bar_unit – Unit for scale bar

  • bbox_buffer – Buffer around data extent

  • figsize – Figure size in inches

  • dpi – Resolution for saved figure

  • output_dirs – Dictionary of output directories

Returns:

Path to saved figure

Static Visualization

Functions for creating static maps of hydro-topological features.

plot_static_map(site_id: str, raster_path: str, aoi_path: str = None, cmap: str = 'terrain', vmin: float = None, vmax: float = None, Name: str = None, Unit: str = None, aoi_color: str = None, aoi_linestyle: str = None, aoi_linewidth: int = None, show_grid: bool = None, show_lon_lat: bool = None, show_scale_bar: bool = None, scale_bar_length: int = None, scale_bar_color: str = None, scale_bar_unit: str = None, bbox_buffer: float = None, figsize: tuple = (18, 6), dpi: int = None, output_dirs: Dict[str, Path] | None = None) str[source]

Create a static map visualization of a raster dataset.

Parameters:
  • site_id – Unique identifier for the site

  • raster_path – Path to the raster file to plot

  • aoi_path – Path to the AOI shapefile/geopackage

  • cmap – Matplotlib colormap name

  • vmin – Minimum value for colormap

  • vmax – Maximum value for colormap

  • Name – Name of the feature for the title

  • Unit – Unit for the colorbar label

  • aoi_color – Color for AOI boundary

  • aoi_linestyle – Line style for AOI boundary

  • aoi_linewidth – Line width for AOI boundary

  • show_grid – Whether to show grid lines

  • show_lon_lat – Whether to show lon/lat labels

  • show_scale_bar – Whether to show scale bar

  • scale_bar_length – Length of scale bar

  • scale_bar_color – Color of scale bar

  • scale_bar_unit – Unit for scale bar

  • bbox_buffer – Buffer around data extent

  • figsize – Figure size in inches

  • dpi – Resolution for saved figure

  • output_dirs – Dictionary of output directories

Returns:

Path to saved figure

Interactive Visualization

Functions for creating interactive maps of hydro-topological features.

plot_interactive_map(site_id: str, raster_paths: list, aoi_path: str = None, Name: list = None, Unit: list = None, vmin: list = None, vmax: list = None, cmap: list = None, opacity: float = None, zoom_start: int = None, output_dirs: Dict[str, Path] | None = None) str[source]

Create an interactive map with multiple raster layers.

Parameters:
  • site_id – Unique identifier for the site

  • raster_paths – List of paths to raster files

  • aoi_path – Path to AOI shapefile/geopackage

  • Name – List of names for each raster layer

  • Unit – List of units for each raster layer

  • vmin – List of minimum values for each raster

  • vmax – List of maximum values for each raster

  • cmap – List of colormaps for each raster

  • opacity – Opacity for raster layers

  • zoom_start – Initial zoom level

  • output_dirs – Dictionary of output directories

Returns:

Path to saved HTML map