Skip to content
Snippets Groups Projects
Commit 1334778a authored by pascal.mouquet_ird.fr's avatar pascal.mouquet_ird.fr
Browse files

Change to bilinear resampling instead of nearest for NDWIGAO and MNDWI indices to remove artifacts

parent d05895f0
Branches
Tags
No related merge requests found
......@@ -83,7 +83,7 @@ def create_raw_ndwi(nir_path: Union[str, pathlib.PosixPath],
src_crs=swir_src.crs,
dst_transform=nir_src.transform,
dst_crs=nir_src.crs,
resampling=Resampling.nearest)
resampling=Resampling.bilinear)
np.seterr(divide='ignore', invalid='ignore') # ignore warnings when dividing by zero
ndwi = ((nir - swir_reproj) / (nir + swir_reproj)*10000).astype(np.int16)
......@@ -283,7 +283,7 @@ def create_raw_mndwi(green_path: Union[str, pathlib.PosixPath],
src_crs=swir_src.crs,
dst_transform=green_src.transform,
dst_crs=green_src.crs,
resampling=Resampling.nearest)
resampling=Resampling.bilinear)
np.seterr(divide='ignore', invalid='ignore') # ignore warnings when dividing by zero
ndwi = ((green - swir_reproj) / (green + swir_reproj)*10000).astype(np.int16)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment