GlacioHack / geoutils

Analysis of georeferenced rasters and vectors
https://geoutils.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
86 stars 19 forks source link

Use euclidean distance to propagate NaNs in `interp_points`? #603

Open rhugonnet opened 2 months ago

rhugonnet commented 2 months ago

Currently we use a series of binary_dilation to propagate NaNs to a certain pixel distance in interp_points, but this seems to match the L1 norm (abs(dX) + abs(dY)) and not a classic euclidean distance. Should we change this scheme to an euclidean distance instead? (same calculation as Raster.proximity()) Would this better match the reason for the nodata propagation? (=size of interpolation kernels for linear/cubic/quintic methods)

See original mention below:

_Originally posted by @rhugonnet in https://github.com/GlacioHack/geoutils/pull/560#discussion_r1742793245_