[gdal-dev] Sentinel-2 Sun view angles / access to dataset files
Luis Herrero
luis.herrero at gmail.com
Tue Feb 18 14:35:15 PST 2020
Hi there!
First of all, thank you for your incredible work. I am a newbie in GDAL
(mainly through Rasterio actually) and, well, I am astonished about how
useful it is.
I am processing Sentinel-2 L1C images in compact safe format. In order to
convert from TOA reflectance to surface reflectance, I need to access to
the zenith and azimuth viewing angles. This data may be read from the
MTD_TL.xml file (for example, in the test file
https://github.com/OSGeo/gdal/blob/master/autotest/gdrivers/data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/GRANULE/FOO/MTD_TL.xml
it
is under the node “Mean_Viewing_Incidence_Angle”).
I have tried to access through the xml:SENTINEL2 metadata (see
https://gdal.org/drivers/raster/sentinel2.html#metadata) but I get the
global metadata file (in the test
https://github.com/OSGeo/gdal/blob/master/autotest/gdrivers/data/fake_sentinel2_l1c_safecompact/S2A_MSIL1C_test.SAFE/MTD_MSIL1C.xml).
I cannot get it either reading from the xml:VRT metadata domain. I have
also tried to read it from the subdatasets, but the values do not appear
either.
I have two questions:
1) Are these values already available, and it is my fault not being
able to read them?
2) If these values are not available, I am thinking in just parsing the
XML. Even if these values are available, eventually I will need to read
some data not available as tags. However, GDAL transparently manages lots
of things through the virtual file systems (I am interested in S3 buckets).
I am wondering if there is any GDAL’s API for reading any file as a plain
text file.
Looking forward to hearing from you.
Thank you very much
Luis Herrero
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200218/3de51064/attachment.html>
More information about the gdal-dev
mailing list