Alternative draft

GUI Mockup

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.

GPF Parameter XML
<parameters>
    <referenceBand>B1</referenceBand>
<!-- Still supported but deprecated
    <upsampling>Nearest</upsampling>
    <downsampling>First</downsampling>
    <flagDownsampling>First</flagDownsampling>
-->
    <!-- if empty the the default is used -->
    <resamplingPreset>S2_MSI_RESAMPLER</resamplingPreset>
    <!-- over rules the settings by the resampling preset-->
    <bandResamplings>B2:First,B3:First,B4:First,B5:Median</bandResamplings>
    <resampleOnPyramidLevels>true</resampleOnPyramidLevels>
</parameters>