From 3b2b63dac31b38151242b614c61a262f0641463c Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 28 May 2024 17:58:53 +0200 Subject: [PATCH 1/2] Add classification:classes to SCL asset #165 --- CHANGELOG.MD | 6 ++ .../S2A_T07HFE_20190212T192646_L2A.json | 55 ++++++++++++++++++- src/stactools/sentinel2/stac.py | 27 +++++++-- 3 files changed, 80 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index fb7fa04..ccd8511 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project attempts to match the major and minor versions of [stactools](https://github.com/stac-utils/stactools) and increments the patch number as needed. +## [Unreleased] + +### Added + +- Added a `classification:classes` field to the `scl` asset (SCL). + ## [0.6.4] - 2024-04-04 ### Added diff --git a/examples/sentinel2-l2a-example/S2A_T07HFE_20190212T192646_L2A/S2A_T07HFE_20190212T192646_L2A.json b/examples/sentinel2-l2a-example/S2A_T07HFE_20190212T192646_L2A/S2A_T07HFE_20190212T192646_L2A.json index f369db5..57c1ab2 100644 --- a/examples/sentinel2-l2a-example/S2A_T07HFE_20190212T192646_L2A/S2A_T07HFE_20190212T192646_L2A.json +++ b/examples/sentinel2-l2a-example/S2A_T07HFE_20190212T192646_L2A/S2A_T07HFE_20190212T192646_L2A.json @@ -558,7 +558,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1733,7 +1783,8 @@ "https://stac-extensions.github.io/mgrs/v1.0.0/schema.json", "https://stac-extensions.github.io/grid/v1.1.0/schema.json", "https://stac-extensions.github.io/view/v1.0.0/schema.json", - "https://stac-extensions.github.io/sentinel-2/v1.0.0/schema.json" + "https://stac-extensions.github.io/sentinel-2/v1.0.0/schema.json", + "https://stac-extensions.github.io/classification/v1.1.0/schema.json" ], "collection": "sentinel2-l2a-example" } \ No newline at end of file diff --git a/src/stactools/sentinel2/stac.py b/src/stactools/sentinel2/stac.py index 0d94262..5028127 100644 --- a/src/stactools/sentinel2/stac.py +++ b/src/stactools/sentinel2/stac.py @@ -11,6 +11,7 @@ import antimeridian import pystac +from pystac.extensions.classification import Classification, ClassificationExtension from pystac.extensions.eo import Band, EOExtension from pystac.extensions.grid import GridExtension from pystac.extensions.projection import ProjectionExtension @@ -465,12 +466,26 @@ def set_asset_properties(_asset: pystac.Asset, _band_gsd: Optional[int] = None): asset_id = mk_asset_id(maybe_res, "scl") set_asset_properties(asset, maybe_res) - RasterExtension.ext(asset).bands = [ - RasterBand.create( - nodata=0, - spatial_resolution=resolution, - data_type=DataType.UINT8, - ) + band = RasterBand.create( + nodata=0, + spatial_resolution=resolution, + data_type=DataType.UINT8, + ) + RasterExtension.ext(asset).bands = [band] + + ClassificationExtension.ext(band).classes = [ + Classification.create(0, "no_data"), + Classification.create(1, "saturated_or_defective"), + Classification.create(2, "dark_area_pixels"), + Classification.create(3, "cloud_shadows"), + Classification.create(4, "vegetation"), + Classification.create(5, "not_vegetated"), + Classification.create(6, "water"), + Classification.create(7, "unclassified"), + Classification.create(8, "cloud_medium_probability"), + Classification.create(9, "cloud_high_probability"), + Classification.create(10, "thin_cirrus"), + Classification.create(11, "snow"), ] elif CLD_PATTERN.search(asset_href): From f676b83418d39e30484a7aff8af0905eb9179314 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 29 May 2024 13:02:14 +0200 Subject: [PATCH 2/2] Update expected_output files as much as possible --- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- .../expected_output.json | 106 +++++++++++++++++- 12 files changed, 1236 insertions(+), 36 deletions(-) diff --git a/tests/data-files/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE/expected_output.json b/tests/data-files/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE/expected_output.json index 590b2d8..14ff22f 100644 --- a/tests/data-files/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE/expected_output.json +++ b/tests/data-files/S2A_MSIL2A_20190212T192651_N0212_R013_T07HFE_20201007T160857.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_T07HFE_20190212T192646_L2A", "properties": { - "created": "2024-04-03T15:21:15.758770Z", + "created": "2024-05-29T10:51:51.944555Z", "providers": [ { "name": "ESA", @@ -543,7 +543,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1200,7 +1250,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022157.SAFE/expected_output.json b/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022157.SAFE/expected_output.json index cc9646f..03c37d5 100644 --- a/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022157.SAFE/expected_output.json +++ b/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022157.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_T01WCP_20230625T234624_L2A", "properties": { - "created": "2024-04-03T15:21:15.594079Z", + "created": "2024-05-29T10:51:51.984651Z", "providers": [ { "name": "ESA", @@ -1055,7 +1055,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1712,7 +1762,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022158.SAFE/expected_output.json b/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022158.SAFE/expected_output.json index 4972bf2..7ad4960 100644 --- a/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022158.SAFE/expected_output.json +++ b/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCP_20230626T022158.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_T01WCP_20230625T234624_L2A", "properties": { - "created": "2024-04-03T15:21:15.881344Z", + "created": "2024-05-29T10:51:52.026256Z", "providers": [ { "name": "ESA", @@ -1051,7 +1051,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1708,7 +1758,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCS_20230626T022157.SAFE/expected_output.json b/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCS_20230626T022157.SAFE/expected_output.json index 384036e..c9c6acb 100644 --- a/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCS_20230626T022157.SAFE/expected_output.json +++ b/tests/data-files/S2A_MSIL2A_20230625T234621_N0509_R073_T01WCS_20230626T022157.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_T01WCS_20230625T234624_L2A", "properties": { - "created": "2024-04-03T15:21:15.971291Z", + "created": "2024-05-29T10:51:52.064370Z", "providers": [ { "name": "ESA", @@ -1083,7 +1083,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1740,7 +1790,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_MSIL2A_20230821T221941_N0509_R029_T01KAB_20230822T021825.SAFE/expected_output.json b/tests/data-files/S2A_MSIL2A_20230821T221941_N0509_R029_T01KAB_20230822T021825.SAFE/expected_output.json index 27cbb16..564fc3d 100644 --- a/tests/data-files/S2A_MSIL2A_20230821T221941_N0509_R029_T01KAB_20230822T021825.SAFE/expected_output.json +++ b/tests/data-files/S2A_MSIL2A_20230821T221941_N0509_R029_T01KAB_20230822T021825.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_T01KAB_20230821T221944_L2A", "properties": { - "created": "2024-04-03T15:21:15.669125Z", + "created": "2024-05-29T10:51:52.116195Z", "providers": [ { "name": "ESA", @@ -1055,7 +1055,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1712,7 +1762,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_OPER_MSI_L2A_TL_2APS_20240108T121951_A044635_T34VEL/expected_output.json b/tests/data-files/S2A_OPER_MSI_L2A_TL_2APS_20240108T121951_A044635_T34VEL/expected_output.json index 99a6ff2..6c732e6 100644 --- a/tests/data-files/S2A_OPER_MSI_L2A_TL_2APS_20240108T121951_A044635_T34VEL/expected_output.json +++ b/tests/data-files/S2A_OPER_MSI_L2A_TL_2APS_20240108T121951_A044635_T34VEL/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_OPER_MSI_L2A_TL_2APS_20240108T121951_A044635_T34VEL", "properties": { - "created": "2024-04-03T15:21:16.184832Z", + "created": "2024-05-29T10:51:52.170449Z", "providers": [ { "name": "ESA", @@ -863,7 +863,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1519,7 +1569,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG/expected_output.json b/tests/data-files/S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG/expected_output.json index 71d6aff..00d8ab5 100644 --- a/tests/data-files/S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG/expected_output.json +++ b/tests/data-files/S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_OPER_MSI_L2A_TL_SGS__20181231T210250_A018414_T10SDG", "properties": { - "created": "2024-04-03T15:21:15.928910Z", + "created": "2024-05-29T10:51:52.210855Z", "providers": [ { "name": "ESA", @@ -869,7 +869,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1525,7 +1575,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBP/expected_output.json b/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBP/expected_output.json index f7b6b54..58070e9 100644 --- a/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBP/expected_output.json +++ b/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBP/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBP", "properties": { - "created": "2024-04-03T15:21:15.128180Z", + "created": "2024-05-29T10:51:52.248634Z", "providers": [ { "name": "ESA", @@ -869,7 +869,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1525,7 +1575,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBQ/expected_output.json b/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBQ/expected_output.json index 6d853be..c1ee26e 100644 --- a/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBQ/expected_output.json +++ b/tests/data-files/S2A_OPER_MSI_L2A_TL_VGS1_20220401T110010_A035382_T34LBQ/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2A_T34LBQ_20220401T090142_L2A", "properties": { - "created": "2024-04-03T15:21:15.715923Z", + "created": "2024-05-29T10:51:52.284554Z", "providers": [ { "name": "ESA", @@ -875,7 +875,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1531,7 +1581,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2B_MSIL2A_20191228T210519_N0212_R071_T01CCV_20201003T104658.SAFE/expected_output.json b/tests/data-files/S2B_MSIL2A_20191228T210519_N0212_R071_T01CCV_20201003T104658.SAFE/expected_output.json index 8f8b5bd..215ae45 100644 --- a/tests/data-files/S2B_MSIL2A_20191228T210519_N0212_R071_T01CCV_20201003T104658.SAFE/expected_output.json +++ b/tests/data-files/S2B_MSIL2A_20191228T210519_N0212_R071_T01CCV_20201003T104658.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2B_T01CCV_20191228T210521_L2A", "properties": { - "created": "2024-04-03T15:21:15.804425Z", + "created": "2024-05-29T10:51:52.323222Z", "providers": [ { "name": "ESA", @@ -559,7 +559,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1216,7 +1266,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/S2B_MSIL2A_20220413T150759_N0400_R025_T33XWJ_20220414T082126.SAFE/expected_output.json b/tests/data-files/S2B_MSIL2A_20220413T150759_N0400_R025_T33XWJ_20220414T082126.SAFE/expected_output.json index 91b121e..425ccfa 100644 --- a/tests/data-files/S2B_MSIL2A_20220413T150759_N0400_R025_T33XWJ_20220414T082126.SAFE/expected_output.json +++ b/tests/data-files/S2B_MSIL2A_20220413T150759_N0400_R025_T33XWJ_20220414T082126.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2B_T33XWJ_20220413T150756_L2A", "properties": { - "created": "2024-04-03T15:21:16.016631Z", + "created": "2024-05-29T10:51:52.361467Z", "providers": [ { "name": "ESA", @@ -575,7 +575,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1232,7 +1282,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ diff --git a/tests/data-files/esa_S2B_MSIL2A_20210122T133229_N0214_R081_T22HBD_20210122T155500.SAFE/expected_output.json b/tests/data-files/esa_S2B_MSIL2A_20210122T133229_N0214_R081_T22HBD_20210122T155500.SAFE/expected_output.json index 569eb04..e903026 100644 --- a/tests/data-files/esa_S2B_MSIL2A_20210122T133229_N0214_R081_T22HBD_20210122T155500.SAFE/expected_output.json +++ b/tests/data-files/esa_S2B_MSIL2A_20210122T133229_N0214_R081_T22HBD_20210122T155500.SAFE/expected_output.json @@ -3,7 +3,7 @@ "stac_version": "1.0.0", "id": "S2B_T22HBD_20210122T133224_L2A", "properties": { - "created": "2024-04-03T15:21:16.107827Z", + "created": "2024-05-29T10:51:51.420137Z", "providers": [ { "name": "ESA", @@ -1017,7 +1017,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 20 + "spatial_resolution": 20, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [ @@ -1674,7 +1724,57 @@ { "nodata": 0, "data_type": "uint8", - "spatial_resolution": 60 + "spatial_resolution": 60, + "classification:classes": [ + { + "value": 0, + "description": "no_data" + }, + { + "value": 1, + "description": "saturated_or_defective" + }, + { + "value": 2, + "description": "dark_area_pixels" + }, + { + "value": 3, + "description": "cloud_shadows" + }, + { + "value": 4, + "description": "vegetation" + }, + { + "value": 5, + "description": "not_vegetated" + }, + { + "value": 6, + "description": "water" + }, + { + "value": 7, + "description": "unclassified" + }, + { + "value": 8, + "description": "cloud_medium_probability" + }, + { + "value": 9, + "description": "cloud_high_probability" + }, + { + "value": 10, + "description": "thin_cirrus" + }, + { + "value": 11, + "description": "snow" + } + ] } ], "roles": [