S2tbx_L2A_QGIS

Hello everyone, I’m using Scihub Copernicus images L2A to perform a classification with SCP plugin for QGIS. I have already performed a classification using L1C images, corrected and converted with sen2cor, but what about L2A images? I try to use the band match calculator dividing by 10000 the dn value of each bands with SNAP and then I open the images in QGIS but something doesn’t work, SCP seems not reading the bands. Any suggestion?

Did you select and import the bands in the Band Set tab of SCP where you assign the wavelengths and scaling factors?

Yes, I set the center wavelenght for each band and I leave the original multiplicative factor =1 and the original additive factor=0 .

and what is displayed? Or why is it not working then?

The problem is that QGIS expects B8 and B8A but B8 is not present in L2A products. Still, I can load the bands and assign wavelengths for the later processing in SCP

These are the error messages:

  • the warning 22 is related to the coordinate system of the new training file that i created and It said that is different from the one of the images (strange, because images and any other layers have the same EPSG: 32632;
  • the other warning related to a Python error appears while I was highlighted the spectral signature plot, after I selected a ROI.

so it is not a matter of L2A data but of the training files you created. These must be in the same coordinate system as the raster data.
Have you tried creating a new training file as suggested?

L2A products contain all the bands exept B10 in the SWIR for cirrus, right?. I didn’t use the quick wavelenght settings but I set manually the center wavelenght because I’m working with all the bands exept 10.

I can only speak for myself, but I have always used the bands which are suggested in the quick wavelength settings

grafik

I cannot tell how the SCP plugin of QGIS handles manual modification of this list.

Ok I will try as you suggest, by the way is the band match of SNAP the right way to “convert” and scale the data from integer to float. Just to be sure about the procedure. Last question about the quantification value: the one that I referred to is the L2A_BOA but there are 2 others that are different. Are these for other computation?

actually, L1C and L2A data are structured the same regarding the quantification value.

I would rather use the preprocessing tool to scale the data correctly by giving the location MTD file (instead of doing this manually) because this converts the integer data to float.

Please check here (from 11:50): https://www.youtube.com/watch?v=XGxYVoX2jOY&t=840s

I used the Sentinel-2 conversion tool for another classification using L1C images download from SCP plattaform, but in this case there was a problem with the download with SCP, no images appears for east Italy in 2017. Probably because the images were offline materials and needed a request made by Scihub/Copenicus plattaform. So this is why I downloaded from the L2A images from Scihub and then I tried to import correctly in SCP. I also tried as you suggest, correcting the images signed the right directory for the images directory’s and the MTD file but no data where uploaded in QGIS. Probably because there are no correction needed from radiance to reflectance? (when i tried with L1C images they appears in the windows)

does this help? 2 Defining classification inputs in SCP-plugin

The example uses a stack of a L2A products (only the predefined bands) and manually adds the multiplicative factor.

It will be usefull for sure thanks, I only didn t understand which kind of data he is uploading (“Load a multiband file of Sentinel-2 product L1C and L2A stored as digital numbers in data format unsigned integer 16bit (e.g. \lucc\s2\Subset_S2A_MSIL2A_20170619T_MUL.tif) into the QGIS canvas”).
Should I upload the single bands images (file.jp2) originally downloaded without any SNAP conversion?

yes, a stack of the L2A bands as GeoTiff

thanks @ABraun for your suggestion, I overcome the issue with the training input and the roi signature plot. Last thing to solve: while doing the resampling of my images and then subset the single band in order to export separate Geotiff, I’m resampling my date to 20m? Because from the RGB image composite seems that I lost quality in resolution.

that is hard to understand, I’m not sure what you mean, sorry.

problem solved, i subset every single band (without resampling) manteining the original resolution of each bands

1 Like