Pipeline API

The pipeline module provides the main entry point for the Hydro-Topo Features package. It contains functions for running the complete pipeline for extracting hydro-topographic features.

Main pipeline for processing hydro-topological features.

create_interactive_visualization(site_id: str, aoi_path: str, raster_outputs: Dict[str, str], output_dirs: Dict[str, Path]) str[source]

Create an interactive visualization with all raster outputs.

Parameters:
  • site_id – Unique identifier for the site

  • aoi_path – Path to AOI shapefile/geopackage

  • raster_outputs – Dictionary of raster output paths

  • output_dirs – Dictionary of output directories

Returns:

Path to interactive map

create_static_visualizations(site_id: str, aoi_path: str, raster_outputs: Dict[str, str], output_dirs: Dict[str, Path]) Dict[str, str][source]

Create static visualizations for all raster outputs.

Parameters:
  • site_id – Unique identifier for the site

  • aoi_path – Path to AOI shapefile/geopackage

  • raster_outputs – Dictionary of raster output paths

  • output_dirs – Dictionary of output directories

Returns:

Dictionary of static map paths

run_pipeline(site_id: str, aoi_path: str, dem_tile_folder_path: str, output_path: str | Path | None = None, create_static_maps: bool = True, create_interactive_map: bool = True) Dict[str, str][source]

Run the complete pipeline for processing hydro-topological features.

Parameters:
  • site_id – Unique identifier for the site

  • aoi_path – Path to AOI shapefile/geopackage

  • dem_tile_folder_path – Path to folder containing DEM tiles

  • output_path – Base path for all outputs (default: config.DEFAULT_OUTPUT_DIR)

  • create_static_maps – Whether to create static maps of the features

  • create_interactive_map – Whether to create an interactive map of all features

Returns:

Dictionary of output file paths

setup_directory_structure(output_path: str | Path, site_id: str) Dict[str, Path][source]

Set up the directory structure for outputs.

Parameters:
  • output_path – Base path for all outputs

  • site_id – Unique identifier for the site

Returns:

Dictionary of paths for different output types

Main Pipeline Function

run_pipeline(site_id: str, aoi_path: str, dem_tile_folder_path: str, output_path: str | Path | None = None, create_static_maps: bool = True, create_interactive_map: bool = True) Dict[str, str][source]

Run the complete pipeline for processing hydro-topological features.

Parameters:
  • site_id – Unique identifier for the site

  • aoi_path – Path to AOI shapefile/geopackage

  • dem_tile_folder_path – Path to folder containing DEM tiles

  • output_path – Base path for all outputs (default: config.DEFAULT_OUTPUT_DIR)

  • create_static_maps – Whether to create static maps of the features

  • create_interactive_map – Whether to create an interactive map of all features

Returns:

Dictionary of output file paths

Directory Structure Setup

setup_directory_structure(output_path: str | Path, site_id: str) Dict[str, Path][source]

Set up the directory structure for outputs.

Parameters:
  • output_path – Base path for all outputs

  • site_id – Unique identifier for the site

Returns:

Dictionary of paths for different output types

Visualization Functions

create_static_visualizations(site_id: str, aoi_path: str, raster_outputs: Dict[str, str], output_dirs: Dict[str, Path]) Dict[str, str][source]

Create static visualizations for all raster outputs.

Parameters:
  • site_id – Unique identifier for the site

  • aoi_path – Path to AOI shapefile/geopackage

  • raster_outputs – Dictionary of raster output paths

  • output_dirs – Dictionary of output directories

Returns:

Dictionary of static map paths

create_interactive_visualization(site_id: str, aoi_path: str, raster_outputs: Dict[str, str], output_dirs: Dict[str, Path]) str[source]

Create an interactive visualization with all raster outputs.

Parameters:
  • site_id – Unique identifier for the site

  • aoi_path – Path to AOI shapefile/geopackage

  • raster_outputs – Dictionary of raster output paths

  • output_dirs – Dictionary of output directories

Returns:

Path to interactive map