Sentinel-2 Mosaic - Remove bands "count"


I am working on Sentinel-2 images that I want to mosaic and then apply a classification on. I used the Mosaic tool, and I got a file with the following bands :


Is there a way to remove these bands ? I do not need those for my classification, and I would like to reduce the size of the file, especially for the .TIF export.

Thank you in advance

In the first step, you can remove the valid-pixel expression from the reflectance bands. The count band is used there. Afterwards, you can simply remove them by pressing DEL. But actually it contains valuable information, namely where you have data and where not.
Instead of Mosaic you can also use the L3 Binning tool. There you have more control of what is being written.
You can also create a graph and use BandSelect or BandMaths to create a new product which contains only the bands you need.


I was also wondering about this. band_count indicates 1, ok, this means that there is a data here, being a pixel b_count =1. In the case in which in a pixel, b_count is equal to 2 (b_count=2) what does this mean. The value of the band in that case is two overlapping pixels and they are being added? Please remove this doubt from my mind.

Yes, the count band indicates how many source pixels contributed to the average value.
This can be different for each band because of no-data values and used valid pixel expression.

It means that I am counting twice the value of a pixel? because I did a mask extraction. That would give me wrong data :pensive:

I’m not sure what you are doing.
But the mosaic tool gives you average values of the input bands.
This is stored in e.g., B9. In B9_count the number of contributions is stored.
Often you can simply ignore this, but sometimes this is helpful to know when validating the mosaic result.

1 Like

sorry to insist on this, what I am understanding is the following: I imported shape polygons to my image in snap, they created a mask, but it could have two overlapping polygons… my question is, when I extract pixels by mask, could it affect that I have overlapped two polygons? According to your answer I think not and I’m more relaxed!..

The values are not exported twice. Only those pixels are exported which are covered by the selected mask. Other masks are not considered. And even if imported shapes overlap the pixels are only masked once.

1 Like