In order to implement this we would need three new registries. One for the resampling presets and two for the up- and down-samplers.
The following image shows a hand drafted diagram of the classes.
The ResamplingPresets define for a band name the resampling name. They might be handled similar to the RGBProfiles as they can be described in a plain text file. All presets are added to a ResamplingPresetRegistry. The two other registries are for the up- and down-samplers. They should be provided be provided by the means of META-INF/services SPI. The DownSampling and the UpSampling can have a common ResamplingMethod interface. The Interpolator and the Aggregator interfaces need to be extended. The
init(...) method needs to have the RasterDataNode as Parameter. It might be necessary for the Resampler to access the raster or the product. To have the data in access is not enough. Also a
dispose() method should be added to the interfaces in order to release the resources.
This is how the parameter xml file could look like.
<!-- Still supported but deprecated
<!-- if empty the the default is used -->
<!-- over rules the settings by the resampling preset-->