#6303 closed defect (fixed)
GDAL cannot open L2A Sentinel 2
Reported by: | bboughton | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | svn-trunk |
Severity: | normal | Keywords: | l2a, sentinel |
Cc: | bboughton@… |
Description (last modified by )
I built GDAL today with JPEG2000 driver.
Works: gdalinfo S2A_OPER_PRD_MSIL1C_PDMC_20160101T090858_R030_V20160101T000915_20160101T000915.SAFE
I successfully ran sen2cor to create L2A data.
Fails: gdalinfo S2A_USER_MTD_SAFL2A_PDMC_20160101T090858_R030_V20160101T000915_20160101T000915.xml
Error: gdalinfo failed - unable to open '...'
The fake Sentinel L2A works (gdal/autotest/gdrivers/autotest/data/fake_sentinel2_l2a/S2A_USER_PRD_MSIL2A.SAFE/S2A_USER_MTD_SAFL2A.xml)
I used sen2cor 2.0.6
Failing xml file attached.
Attachments (2)
Change History (15)
by , 9 years ago
comment:1 by , 9 years ago
Fresh download and clean install on new virtual machine gives exactly the same results.
comment:2 by , 9 years ago
Description: | modified (diff) |
---|
comment:4 by , 9 years ago
You do not want to use JPEG2000 driver for any serious work because it is so slow but bug is a bug, though.
comment:5 by , 9 years ago
Thanks but I need a command line utility to convert Sentinel2 imagery to 4 band geotiff.
comment:6 by , 9 years ago
Should be fixed with r32951: "SENTINEL2: be less restrictive on the identification of L2A products (#6303)"
When you write "Works: gdalinfo S2A_OPER_PRD_MSIL1C_PDMC_20160101T090858_R030_V20160101T000915_20160101T000915.SAFE", what is S2A_OPER_PRD_MSIL1C_PDMC_20160101T090858_R030_V20160101T000915_20160101T000915.SAFE ? A directory or a file ? It is supposed to be a directory but I cannot explain which driver would open it.
comment:7 by , 9 years ago
I entered the wrong working command above. The L1C data works. This command works:
gdalinfo S2A_OPER_MTD_SAFL1C_PDMC_20160101T090858_R030_V20160101T000915_20160101T000915.xml
Once I run sen2cor and convert the L1C to L2A gdalinfo cannot read the output xml.
gdalinfo S2A_USER_MTD_SAFL2A_PDMC_20160101T090858_R030_V20160101T000915_20160101T000915.xml
v2.0.5 of sen2cor made no difference. I will try with your above fix and report back.
comment:8 by , 9 years ago
With my comment about JPEG2000 I meant that other drivers are much faster, for example the JP2OpenJPEG one http://www.gdal.org/frmt_jp2openjpeg.html which is also open source.
comment:9 by , 9 years ago
Working now. Thank-you.
And thank-you jratike80 for your help also, I will try the other drivers.
comment:10 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:11 by , 7 years ago
GDAL 2.1.3 supports the new 'safe compact' naming scheme for Sentinel 2 data, which works for L1C products. However, the corresponding L2A products derived from sen2cor v2.3+ are not readable in this version.
gdalinfo recognises the driver as Sentinel 2 but cannot find the subdatasets (as with previous L2A products). I will attach the corresponding metadata required to open the product.
follow-up: 13 comment:12 by , 3 years ago
@ascarth: this is still the case, right? Should we file a new issue or reopen this one?
comment:13 by , 3 years ago
Replying to mschott:
@ascarth: this is still the case, right? Should we file a new issue or reopen this one?
Please make sure you use a recent GDAL version first. And if you do have issues, please file a ticket at https://github.com/OSGeo/gdal/issues/new
Failing Sentinel2 L2A xml file