Option to use arbitrary percentiles as resampling method
Feature description
in gdal raster resize , gdal raster overview add and gdal raster reproject we have several resampling options.
Option to resample to arbitrary percentiles: Apart from the currently implemented options I could imagine demand for aggregating to arbitrary percentiles. A use-case would be for example to downsample canopy height models where it is quite common to use e.g. p95 to get aggregated top canopy heights while not considering outliers. Currently there is already the option to resample to quartiles q1 and q3 in reproject.
More consistent options/namings between tools:
Regarding the implemented options I recognised that the options are -r, --resampling <RESAMPLING> for resize/reproject and --resampling {nearest|average|cubic|cubicspline|lanczos|bilinear|gauss|average_magphase|rms|mode} for overview add. Probably it would be good to make this consistent between them?
Is there a reason there are different/more options (rms, mode, ...) for adding overviews and even more for reprojecting (min, max, sum, ...) than for resizing?
Also nearest neighbour option is called near in resize/reproject and nearest in overviews.
Additional context
No response
Is there a reason there are different/more options (rms, mode, ...) for adding overviews and even more for reprojecting (min, max, sum, ...) than for resizing?
Not really, except that resizing/overview and warping are different code paths, and thus methods missing would need to be reimplemented.
Also nearest neighbour option is called
nearin resize/reproject andnearestin overviews.
just a doc glitch. Fixed per cae3394c17