diff --git a/scripts/README.md b/scripts/README.md index 57056ea..8daa125 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -5,4 +5,10 @@ This folder is dedicated to scripts, whether python, bash or sbatch. Generally, scripts are more for standalone processes while figuring them out. Once a script is more mature, it should be generalized and integrated into the package -itself. \ No newline at end of file +itself. + +## Scripts + +| Scripts | Description | +|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `resample_tiff_raster.py` | Script to resample a target tiff image, so it matches a source image's grid size and area. Resampling strategy is using a Nearest Neighbor algorythm to keep original values.

Use the scripts CLI for more information : `python3 resample_tiff_raster.py --help` | diff --git a/scripts/resample_tiff_raster.py b/scripts/resample_tiff_raster.py index 8ea9a58..83c17ef 100644 --- a/scripts/resample_tiff_raster.py +++ b/scripts/resample_tiff_raster.py @@ -11,10 +11,10 @@ PROJECT_DATA_DIR = pathlib.Path(os.getenv("BASE_DATA_PATH", DATA_DIR)) -def get_source_information(source_image): +def get_source_information(source_image: pathlib.Path): with rasterio.open(source_image) as source: - # Save a lot of the information that is needed, so ortho image can be closed and - # we can save space + # Save a lot of the information that is needed, so ortho image can be closed, and + # we can save memory use source_transform = source.transform source_crs = source.crs source_height = source.height