pub fn resample_dem(dem: &Dem, factor: usize) -> Dem
Resample a DEM to a coarser grid using bilinear interpolation.
factor is the downsampling factor (e.g. 2 halves the resolution).
factor