-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hello, Mr. Congedo! During my personal project, I was using the classification processing script (ID: scp_8:classification) when I realised that its output differs from the classification found in the "Band processing" menu, even though they're using the same function (rs.band_classification).
After a lot of debugging, I realised it was due to a difference in the order of the bands being passed.
Using the classification from the "Band processing" menu, the bands are passed using my defined band set. I was using Sentinel-2 images, which contain the B8A band. The correct order of this band is after the B08 band, which can be defined in the band set, and the result is accurate.
It is a different story when using the scp_8:classification script. For example, here I am using the processing script to choose my input band set from my Sentinel-2 data:
The critical issue lies in the fact that the order cannot be changed. The B8A band is alphanumerically after B12, not B08, and I cannot change that. Therefore, the BA8 band will be after B12 in the input_bands variable being passed to rs.band_classification:
This obviously causes the classification to be incorrect.
I was able to solve this by applying a sorting function for the input_bands variable, but that is specific to Sentinel-2 data. Your feedback on this issue is much appreciated.