Skip to content

Option to use arbitrary percentiles as resampling method #13261

@wiesehahn

Description

@wiesehahn

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions