SEN2COR wrong metadata in SAFE-compact - gdal sentinel-2 cannot find datasets

Hi @fabricebrito, hi @obarrilero,

gdal (I tried both version 2.2.4 and 2.3.1) is still not able to read Sentinel-2 L2A data produced by the latest version of sen2cor (2.5.5). The error message says:

ERROR 1: Cannot find =Level-2A_User_Product.General_Info.L2A_Product_Info
gdalinfo failed - unable to open ‘S2A_MSIL2A_20180827T101021_N0208_R022_T32TPT_20180827T152355.SAFE/MTD_MSIL2A.xml’.

Is there an update or progress on this issue?

Hi @kraftek, hi @umwilm, do you have a solution to this issue? sen2cor L2A products still can’t be read by gdal. Thanks!

we can do nothing about the compatibility in gdal. They should be the gdal developers who could update the S2 reader plugin.

When I reported this it was a Sen2cor issue because the XML metadata file was corrupted.
So at that time the correction was on you.

If the XML file is now ok, you’ve done your part of the job. If not, it’s still on you.

The gdal Sentinel driver was developed by Spatialys with funding from Centre National d’Etudes Spatiales (CNES)

Sorry, perhaps I do not have all the information and I do not know what products can be read or not by gdal.
I can only explain the SNAP side: we had to make a module update for supporting the new format L2A some months ago. As far as I know, the ‘official’ format produced by sen2cor changed and we had to adapt our reader to support it. I do not know how this has been managed by the gdal team. And perhaps, as @fabricebrito says, this is something that should be fixed by the sen2cor developers, perhaps there is an issue with the new product, I do not know. I am going to try to talk with them for clarifying this.

I experienced still the same issue with both gdal 2.3.2 or 2.1.0 that Sen2cor output level 2A data files cannot be opened by gdal programs. Sen2Cor is version 02.05.05

Could you please help to get this fixed?

I think that S2-L2A products are supported now by the latest version of GDAL (since 2.4.0)