s2d2.sentinel2_product

Module Contents

Classes

Sentinel2Product

Notes

class s2d2.sentinel2_product.Sentinel2Product(path: s2d2.typing.Path | None = None)[source]

Notes

For Sentinel-2 Level 1C the metadata is scattered over the files and folders. In order to make this organization more understandable, the following visualization is made:

* S2X_MSIL1C_20XX...
├ AUX_DATA
├ DATASTRIP
│  └ DS_XXX_XXXX...
│     └ QI_DATA
│        └ MTD_DS.xml <- metadata about the data-strip
├ GRANULE
│  └ L1C_TXXXX_XXXX...
│     ├ AUX_DATA
│     ├ IMG_DATA
│     ├ QI_DATA
│     └ MTD_TL.xml <- metadata about the tile
├ HTML
├ rep_info
├ manifest.safe
├ INSPIRE.xml
└ MTD_MSIL1C.xml <- metadata about the product
load_metadata() None[source]

Load meta-data from the product file (MTD_MSIL1C.xml)

Notes

The metadata structure of the Sentinel2 product is as follows:

* MTD_MSIL1C.xml
└ n1:Level-1C_Tile_ID
   ├ n1:General_Info
   │  ├ Product_Info
   │  │  ├ PRODUCT_URI <- .SAFE folder name
   │  │  ├ PROCESSING_LEVEL
   │  │  └ PROCESSING_BASELINE
   │  ├ SPACECRAFT_NAME
   │  ├ SENSING_ORBIT_NUMBER
   │  └ SENSING_ORBIT_DIRECTION
   ├ n1:Geometric_Info
   │  ├ Tile_Geocoding
   │  │  ├ HORIZONTAL_CS_NAME
   │  │  ├ HORIZONTAL_CS_CODE
   │  │  ├ Size : resolution={"10","20","60"}
   │  │  │  ├ NROWS
   │  │  │  └ NCOLS
   │  │  └ Geoposition
   │  │     ├ ULX
   │  │     ├ ULY
   │  │     ├ XDIM
   │  │     └ YDIM
   │  └ Tile_Angles
   └ n1:Quality_Indicators_Info
load_all_metadata()[source]
prepare_viewing()[source]
_get_spacecraft_from_xmlstruct(data_take) None[source]
_get_special_image_values_from_xmlstruct(imag_spc) None[source]
_get_sub_dirs_from_xmlstruct(gran_org) None[source]