environmentaltools.spatiotemporal.raster.save_contours

environmentaltools.spatiotemporal.raster.save_contours(contours, info)[source]

Save extracted contour geometries to disk as a spatial layer (GeoPackage or Shapefile).

Converts a nested list of contour arrays (per percentile or horizon time, per time slice) into real-world geometries and saves them using the save_layer function. The output format is determined by the configuration and the GPKG_ACTIVE flag.

Parameters:
  • contours (list) – Nested list of contour arrays. For each percentile or horizon time, contains a list of per-time-slice contour arrays (each array is an (N, 2) array of pixel indices).

  • info (dict) – Configuration dictionary with output path, coordinate arrays, and index-specific keys (e.g., ‘percentiles’ or ‘horizon_times’).

Returns:

The function writes files to disk and does not return a value.

Return type:

None