Resampling S3

I am trying to resample S3 L2 from 300m pixels to 1500m pixels.
However, when I select the resampling tool and go onto the resampling parameters I am unable to select By pixel resolution.
Is there a reason I cannot do this?

Regards, Harry

To use this option the data must be provided in a geographic coordinate reference system. You need to reproject the data to UTM or WGS84. OLCI data is provided in the satellite grid.

Hi thanks for this.
After reprojecting and subsetting the image I have then tried to rerun the tool by selecting the pixel resolution of 1500m however an error occurs saying /by zero
I have seen a previous post with a similar issue on here Unable to use Resample by pixel resolution in meters on Sentinel 1 and SMOS L3 data - should I use reproject instead?
Has any solution been found for this issue yet?

Sorry, I told you something wrong. I expected that it would work like this. Actually, it would if you choose UTM as the map when reprojecting the data, or some other meter based map.
It is not working for WGS84. See also see the issue I’ve now created (SNAP-853).

But there are other ways to achieve your goal.
If you want to stay in satellite grid you can specify width and height of your target. You just need to divide the source dimension by 5.
The other option is to specify the resolution during the reprojection. Unmark ‘Preserve Resolution’ and open the ‘Output Parameters’ there you can specify the resolution either in meter or degree, depending on the projection you have selected.

Hi,
I feel like I misworded my original question.
I am trying to pass a 5x5 moving window over the whole image to create a count for the number of cloud pixels within each 5x5 window.
I have tried rebinning the bands however this can only tell me if cloud exists or not within the window as I can only select Max as the aggregation method. Is there a way of being able to sum the pixels using this tool?

Ah okay, that’s different.

You can use the L3 binning (Raster / Geometric Operations / Level-3 Binning) for this. But this includes a reprojection to WGS84. So you might not be able to use the result with your original data.

However, if you have a binary band with 0 and 1 values then you can use the average aggregator. If you don’t have such a band you can create one by creating an intermediate source at the bottom of the dialogue. Here you need to ensure that only the pixels are valid you want to count. In your case the cloud pixels, in the example image below the coastline pixels.
When configuring the aggregator you need to mark the checkbox ‘Output counts’.
This way is also not very accurate because it is not always a 5x5 window which is aggregated. The pixels don’t have a constant size over the scene.

If you want to count the pixels on the satellite pixels I think you would need to write some code. Either Java or Python. Have a look at our Developer Guide, if you like.