Skip to content

Commit 9355c0f

Browse files
committed
Harden the signature of write_multiframe_geotiff
1 parent d6b9a0f commit 9355c0f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

uvdat_flood_sim/save_results.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import logging
2+
from pathlib import Path
3+
from typing import Literal
4+
25
import numpy
6+
from numpy.typing import NDArray
37

48
from .constants import GEOSPATIAL_PROJECTION, GEOSPATIAL_BOUNDS
59

@@ -71,9 +75,14 @@ def large_image_write(results, output_path):
7175
logger.info(f'Wrote GeoTIFF to {output_path}.')
7276

7377

74-
def write_multiframe_geotiff(results, output_folder, writer='rasterio'):
78+
def write_multiframe_geotiff(
79+
*,
80+
flood_results: NDArray[numpy.float32],
81+
output_folder: Path,
82+
writer: Literal['rasterio', 'large_image'] = 'rasterio',
83+
) -> None:
7584
output_path = output_folder / 'flood_simulation.tif'
7685
if writer == 'rasterio':
77-
rasterio_write(results, output_path)
86+
rasterio_write(flood_results, output_path)
7887
elif writer == 'large_image':
79-
large_image_write(results, output_path)
88+
large_image_write(flood_results, output_path)

0 commit comments

Comments
 (0)