mapchete-eo 2025.7.0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. mapchete_eo/__init__.py +1 -0
  2. mapchete_eo/archives/__init__.py +0 -0
  3. mapchete_eo/archives/base.py +65 -0
  4. mapchete_eo/array/__init__.py +0 -0
  5. mapchete_eo/array/buffer.py +16 -0
  6. mapchete_eo/array/color.py +29 -0
  7. mapchete_eo/array/convert.py +157 -0
  8. mapchete_eo/base.py +528 -0
  9. mapchete_eo/blacklist.txt +175 -0
  10. mapchete_eo/cli/__init__.py +30 -0
  11. mapchete_eo/cli/bounds.py +22 -0
  12. mapchete_eo/cli/options_arguments.py +243 -0
  13. mapchete_eo/cli/s2_brdf.py +77 -0
  14. mapchete_eo/cli/s2_cat_results.py +146 -0
  15. mapchete_eo/cli/s2_find_broken_products.py +93 -0
  16. mapchete_eo/cli/s2_jp2_static_catalog.py +166 -0
  17. mapchete_eo/cli/s2_mask.py +71 -0
  18. mapchete_eo/cli/s2_mgrs.py +45 -0
  19. mapchete_eo/cli/s2_rgb.py +114 -0
  20. mapchete_eo/cli/s2_verify.py +129 -0
  21. mapchete_eo/cli/static_catalog.py +123 -0
  22. mapchete_eo/eostac.py +30 -0
  23. mapchete_eo/exceptions.py +87 -0
  24. mapchete_eo/geometry.py +271 -0
  25. mapchete_eo/image_operations/__init__.py +12 -0
  26. mapchete_eo/image_operations/color_correction.py +136 -0
  27. mapchete_eo/image_operations/compositing.py +247 -0
  28. mapchete_eo/image_operations/dtype_scale.py +43 -0
  29. mapchete_eo/image_operations/fillnodata.py +130 -0
  30. mapchete_eo/image_operations/filters.py +319 -0
  31. mapchete_eo/image_operations/linear_normalization.py +81 -0
  32. mapchete_eo/image_operations/sigmoidal.py +114 -0
  33. mapchete_eo/io/__init__.py +37 -0
  34. mapchete_eo/io/assets.py +492 -0
  35. mapchete_eo/io/items.py +147 -0
  36. mapchete_eo/io/levelled_cubes.py +228 -0
  37. mapchete_eo/io/path.py +144 -0
  38. mapchete_eo/io/products.py +413 -0
  39. mapchete_eo/io/profiles.py +45 -0
  40. mapchete_eo/known_catalogs.py +42 -0
  41. mapchete_eo/platforms/sentinel2/__init__.py +17 -0
  42. mapchete_eo/platforms/sentinel2/archives.py +190 -0
  43. mapchete_eo/platforms/sentinel2/bandpass_adjustment.py +104 -0
  44. mapchete_eo/platforms/sentinel2/brdf/__init__.py +8 -0
  45. mapchete_eo/platforms/sentinel2/brdf/config.py +32 -0
  46. mapchete_eo/platforms/sentinel2/brdf/correction.py +260 -0
  47. mapchete_eo/platforms/sentinel2/brdf/hls.py +251 -0
  48. mapchete_eo/platforms/sentinel2/brdf/models.py +44 -0
  49. mapchete_eo/platforms/sentinel2/brdf/protocols.py +27 -0
  50. mapchete_eo/platforms/sentinel2/brdf/ross_thick.py +136 -0
  51. mapchete_eo/platforms/sentinel2/brdf/sun_angle_arrays.py +76 -0
  52. mapchete_eo/platforms/sentinel2/config.py +181 -0
  53. mapchete_eo/platforms/sentinel2/driver.py +78 -0
  54. mapchete_eo/platforms/sentinel2/masks.py +325 -0
  55. mapchete_eo/platforms/sentinel2/metadata_parser.py +734 -0
  56. mapchete_eo/platforms/sentinel2/path_mappers/__init__.py +29 -0
  57. mapchete_eo/platforms/sentinel2/path_mappers/base.py +56 -0
  58. mapchete_eo/platforms/sentinel2/path_mappers/earthsearch.py +34 -0
  59. mapchete_eo/platforms/sentinel2/path_mappers/metadata_xml.py +135 -0
  60. mapchete_eo/platforms/sentinel2/path_mappers/sinergise.py +105 -0
  61. mapchete_eo/platforms/sentinel2/preprocessing_tasks.py +26 -0
  62. mapchete_eo/platforms/sentinel2/processing_baseline.py +160 -0
  63. mapchete_eo/platforms/sentinel2/product.py +669 -0
  64. mapchete_eo/platforms/sentinel2/types.py +109 -0
  65. mapchete_eo/processes/__init__.py +0 -0
  66. mapchete_eo/processes/config.py +51 -0
  67. mapchete_eo/processes/dtype_scale.py +112 -0
  68. mapchete_eo/processes/eo_to_xarray.py +19 -0
  69. mapchete_eo/processes/merge_rasters.py +235 -0
  70. mapchete_eo/product.py +278 -0
  71. mapchete_eo/protocols.py +56 -0
  72. mapchete_eo/search/__init__.py +14 -0
  73. mapchete_eo/search/base.py +222 -0
  74. mapchete_eo/search/config.py +42 -0
  75. mapchete_eo/search/s2_mgrs.py +314 -0
  76. mapchete_eo/search/stac_search.py +251 -0
  77. mapchete_eo/search/stac_static.py +236 -0
  78. mapchete_eo/search/utm_search.py +251 -0
  79. mapchete_eo/settings.py +24 -0
  80. mapchete_eo/sort.py +48 -0
  81. mapchete_eo/time.py +53 -0
  82. mapchete_eo/types.py +73 -0
  83. mapchete_eo-2025.7.0.dist-info/METADATA +38 -0
  84. mapchete_eo-2025.7.0.dist-info/RECORD +87 -0
  85. mapchete_eo-2025.7.0.dist-info/WHEEL +5 -0
  86. mapchete_eo-2025.7.0.dist-info/entry_points.txt +11 -0
  87. mapchete_eo-2025.7.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,175 @@
1
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_21NTD_20230604_0_L2A
2
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_28VDP_20231008_0_L2A
3
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_52XDJ_20230727_0_L2A
4
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_51XVE_20230608_0_L2A
5
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_51XVE_20230807_0_L2A
6
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_37QCU_20230208_1_L2A
7
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_28WDU_20230805_0_L2A
8
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_29VNK_20230904_0_L2A
9
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_16SDA_20230815_1_L2A
10
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_16TCM_20230707_1_L2A
11
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_16SGB_20230812_0_L2A
12
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_19EDT_20230504_0_L2A
13
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_56VNL_20230618_0_L2A
14
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_56VNL_20230618_0_L2A
15
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_52WDU_20230602_0_L2A
16
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_24JVT_20230505_0_L2A
17
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_37LGJ_20230517_0_L2A
18
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_37LGJ_20230527_0_L2A
19
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_57UWB_20230721_0_L2A
20
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_51SUV_20230501_0_L2A
21
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_54LTK_20230505_0_L2A
22
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_54SWE_20230825_0_L2A
23
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_54SWE_20230407_1_L2A
24
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_55KDP_20230319_1_L2A
25
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_1MHP_20230311_0_L2A
26
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_2MRB_20231026_0_L2A
27
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_2MQU_20230817_0_L2A
28
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_2MQU_20231115_0_L2A
29
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_43WFM_20231017_0_L2A
30
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_20NPH_20231017_0_L2A
31
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_22MDE_20230411_0_L2A
32
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_14RLP_20230112_1_L2A
33
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_53RLM_20231109_0_L2A
34
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13QBC_20230212_0_L2A
35
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_15PVR_20230209_0_L2A
36
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_22UDF_20230626_0_L2A
37
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_22UDF_20230815_0_L2A
38
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_22UDF_20230830_0_L2A
39
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_22UDF_20231004_0_L2A
40
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_17NNG_20230102_0_L2A
41
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_12VVK_20230606_0_L2A
42
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_12VVK_20230601_0_L2A
43
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_4KGB_20230302_0_L2A
44
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_6KTA_20231128_0_L2A
45
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_4KGB_20230620_0_L2A
46
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_10KFB_20230906_0_L2A
47
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_25MEN_20230216_0_L2A
48
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_24MYS_20231017_0_L2A
49
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_18LXP_20230316_0_L2A
50
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_18PZS_20230329_1_L2A
51
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_17MPS_20230630_0_L2A
52
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_17MQT_20230630_0_L2A
53
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_17MRT_20230630_0_L2A
54
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_17MQU_20230630_0_L2A
55
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_17MRU_20230630_0_L2A
56
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_21KWP_20230131_0_L2A
57
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_23PPN_20230224_0_L2A
58
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_4NEK_20231126_0_L2A
59
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_4QFH_20230508_0_L2A
60
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_42QTL_20230913_0_L2A
61
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13RDH_20230110_0_L2A
62
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13REH_20230110_0_L2A
63
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13RFH_20230110_0_L2A
64
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13RDJ_20230110_0_L2A
65
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13REJ_20230110_0_L2A
66
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13QEG_20230328_0_L2A
67
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13QFG_20230328_0_L2A
68
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_49LFK_20230314_0_L2A
69
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_49LFK_20230905_0_L2A
70
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_58MGD_20230906_0_L2A
71
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_59NMD_20230516_0_L2A
72
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_60KTU_20230514_0_L2A
73
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_59KRP_20230603_0_L2A
74
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_59KRP_20231016_0_L2A
75
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_59KRP_20231230_0_L2A
76
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_58LHQ_20231202_0_L2A
77
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_58PEU_20230105_0_L2A
78
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_58PEU_20230515_0_L2A
79
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58KGU_20230508_0_L2A
80
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_48LYR_20230228_0_L2A
81
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_49PGS_20230109_0_L2A
82
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_53NLF_20230919_0_L2A
83
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_51MTN_20230906_1_L2A
84
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_52MBT_20230823_0_L2A
85
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_30VWK_20231017_0_L2A
86
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58WDB_20230706_0_L2A
87
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_8UPD_20230902_0_L2A
88
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_54MYV_20230706_0_L2A
89
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_56LPL_20231213_0_L2A
90
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_56LPL_20231223_0_L2A
91
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_21XVF_20230913_0_L2A
92
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_24XVH_20230729_2_L2A
93
+ s3://sentinel-s2-l2a-stac/2023/08/05/S2A_OPER_MSI_L2A_TL_2APS_20230806T022123_A042412_T60VXH.json
94
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_20RPU_20230308_0_L2A
95
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_31XDF_20230810_2_L2A
96
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_35XLA_20230807_0_L2A
97
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_38CME_20230315_0_L2A
98
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_35CNP_20230213_0_L2A
99
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_41CMV_20230202_0_L2A
100
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_51CWM_20230120_1_L2A
101
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_52CDR_20230122_1_L2A
102
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_26CNA_20230225_0_L2A
103
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_25CDM_20230123_2_L2A
104
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_57CVP_20230314_0_L2A
105
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_8CNS_20230206_1_L2A
106
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_32SLH_20240313_0_L2A
107
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_22XDJ_20240716_2_L2A
108
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_43PBT_20240216_0_L2A
109
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_35HLA_20240203_0_L2A
110
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_35HLA_20240208_0_L2A
111
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_35HPA_20240225_0_L2A
112
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_35HPA_20240126_0_L2A
113
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_35HLA_20240124_0_L2A
114
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_39LXK_20240305_0_L2A
115
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_39LXK_20240315_0_L2A
116
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_38JLS_20240106_0_L2A
117
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_42FYM_20240304_0_L2A
118
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_43FEB_20240202_0_L2A
119
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_43FEB_20240522_0_L2A
120
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_29LKJ_20240613_0_L2A
121
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_51JXN_20240130_0_L2A
122
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_24FYF_20240325_0_L2A
123
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_55HFV_20240201_0_L2A
124
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_1GFM_20240126_0_L2A
125
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_1WEV_20240612_0_L2A
126
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_5VLG_20240520_1_L2A
127
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_42QTL_20240818_0_L2A
128
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_9UXB_20240620_0_L2A
129
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_13UFU_20240725_0_L2A
130
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_21VVK_20240506_1_L2A
131
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_53VLE_20240714_0_L2A
132
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_19XDE_20240705_1_L2A
133
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58XDJ_20240807_0_L2A
134
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58XDJ_20240509_0_L2A
135
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_56WNT_20240606_1_L2A
136
+ s3://sentinel-s2-l2a-stac/2024/05/05/S2B_OPER_MSI_L2A_TL_2BPS_20240506T001713_A037422_T01VCJ.json
137
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_22UED_20240612_0_L2A
138
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_22UED_20240905_0_L2A
139
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_22UED_20241030_0_L2A
140
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_34CEU_20240227_0_L2A
141
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_41CNS_20240215_0_L2A
142
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_34DFJ_20240116_0_L2A
143
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_22UDF_20240730_0_L2A
144
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_22UDF_20240829_0_L2A
145
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_30NYJ_20240430_0_L2A
146
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_31MHT_20240620_0_L2A
147
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_31MHT_20240630_0_L2A
148
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_19LGK_20240714_0_L2A
149
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_2MRB_20240124_0_L2A
150
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_2MRB_20240218_0_L2A
151
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_2MRB_20240712_0_L2A
152
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_2MQU_20241104_0_L2A
153
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_2MRB_20241124_0_L2A
154
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_2LMR_20240122_0_L2A
155
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_2LMR_20240406_0_L2A
156
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_2LMR_20240526_0_L2A
157
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_6KTA_20240516_0_L2A
158
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_53NLF_20240221_0_L2A
159
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_53NLF_20240401_0_L2A
160
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_53NLF_20240625_0_L2A
161
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_53NLF_20240804_0_L2A
162
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_7JDH_20241026_0_L2A
163
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_59QLA_20240102_0_L2A
164
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_59QLB_20240421_0_L2A
165
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_59NMD_20240126_0_L2A
166
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58MGD_20240707_0_L2A
167
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58MGD_20240915_0_L2A
168
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58MGD_20241015_0_L2A
169
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58LHQ_20240405_0_L2A
170
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58LHQ_20240714_0_L2A
171
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_59KRP_20240612_0_L2A
172
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_58KGU_20240202_0_L2A
173
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_47XNH_20240603_1_L2A
174
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_48XWN_20240703_1_L2A
175
+ https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2B_49XDH_20240505_1_L2A
@@ -0,0 +1,30 @@
1
+ import click
2
+
3
+ from mapchete_eo.cli.bounds import bounds
4
+ from mapchete_eo.cli.s2_brdf import s2_brdf
5
+ from mapchete_eo.cli.s2_cat_results import s2_cat_results
6
+ from mapchete_eo.cli.s2_find_broken_products import s2_find_broken_products
7
+ from mapchete_eo.cli.s2_jp2_static_catalog import s2_jp2_static_catalog
8
+ from mapchete_eo.cli.s2_mask import s2_mask
9
+ from mapchete_eo.cli.s2_mgrs import s2_mgrs
10
+ from mapchete_eo.cli.s2_rgb import s2_rgb
11
+ from mapchete_eo.cli.s2_verify import s2_verify
12
+ from mapchete_eo.cli.static_catalog import static_catalog
13
+
14
+
15
+ @click.group(help="Tools around mapchete EO package.")
16
+ @click.pass_context
17
+ def eo(ctx):
18
+ ctx.ensure_object(dict)
19
+
20
+
21
+ eo.add_command(bounds)
22
+ eo.add_command(s2_brdf)
23
+ eo.add_command(s2_cat_results)
24
+ eo.add_command(s2_find_broken_products)
25
+ eo.add_command(s2_jp2_static_catalog)
26
+ eo.add_command(s2_mask)
27
+ eo.add_command(s2_mgrs)
28
+ eo.add_command(s2_rgb)
29
+ eo.add_command(s2_verify)
30
+ eo.add_command(static_catalog)
@@ -0,0 +1,22 @@
1
+ import click
2
+ import pystac
3
+ from mapchete.cli.options import opt_debug
4
+ from mapchete.path import MPath
5
+
6
+ from mapchete_eo.cli import options_arguments
7
+ from mapchete_eo.io.items import item_fix_footprint
8
+
9
+
10
+ @click.command()
11
+ @options_arguments.arg_stac_item
12
+ @opt_debug
13
+ def bounds(
14
+ stac_item: MPath,
15
+ **_,
16
+ ):
17
+ """Prints bounds of STAC item."""
18
+ item = item_fix_footprint(pystac.Item.from_file(stac_item))
19
+ if item.bbox:
20
+ click.echo(f"{' '.join(map(str, item.bbox))}")
21
+ else:
22
+ click.echo("item does not have a bounding box")
@@ -0,0 +1,243 @@
1
+ from typing import Optional
2
+
3
+ import click
4
+ import tqdm
5
+ from mapchete.path import MPath
6
+
7
+ from mapchete_eo.platforms.sentinel2.brdf.models import BRDFModels
8
+ from mapchete_eo.io.profiles import rio_profiles
9
+ from mapchete_eo.platforms.sentinel2.archives import KnownArchives
10
+ from mapchete_eo.platforms.sentinel2.config import SceneClassification
11
+ from mapchete_eo.platforms.sentinel2.types import L2ABand, Resolution
12
+ from mapchete_eo.time import to_datetime
13
+
14
+
15
+ class TqdmUpTo(tqdm.tqdm):
16
+ """Provides `update_to(n)` which uses `tqdm.update(delta_n)`."""
17
+
18
+ def update_to(self, n: int = 1, nsize: int = 1, total: Optional[int] = None):
19
+ """
20
+ n : int, optional
21
+ Number of blocks transferred so far [default: 1].
22
+ nsize : int, optional
23
+ Size of each block (in tqdm units) [default: 1].
24
+ total : int, optional
25
+ Total size (in tqdm units). If [default: None] remains unchanged.
26
+ """
27
+ if total is not None:
28
+ self.total = total
29
+ return self.update(n * nsize - self.n) # also sets self.n = b * bsize
30
+
31
+
32
+ def _str_to_list(_, __, value):
33
+ if value:
34
+ return value.split(",")
35
+ return []
36
+
37
+
38
+ def _str_to_resolution(_, __, value):
39
+ if value:
40
+ return Resolution[value]
41
+
42
+
43
+ def _str_to_rio_profile(_, __, value):
44
+ if value:
45
+ return rio_profiles[value]
46
+
47
+
48
+ def _brdf_model_str_to_brdf(_, __, value):
49
+ if value:
50
+ if value == "none":
51
+ return None
52
+ else:
53
+ return BRDFModels[value]
54
+
55
+
56
+ def _str_to_l2a_bands(_, __, value):
57
+ if value:
58
+ return [L2ABand[v] for v in value.split(",")]
59
+
60
+
61
+ def _archive_name_to_archive_cls(_, __, value):
62
+ if value:
63
+ return KnownArchives[value]
64
+
65
+
66
+ def _str_to_datetime(_, param, value):
67
+ if value:
68
+ return to_datetime(value)
69
+ else:
70
+ raise ValueError(f"--{param.name} is mandatory")
71
+
72
+
73
+ arg_stac_item = click.argument("stac-item", type=click.Path(path_type=MPath))
74
+ arg_stac_items = click.argument(
75
+ "stac-items", type=click.Path(path_type=MPath), nargs=-1
76
+ )
77
+ arg_dst_path = click.argument("dst-path", type=click.Path(path_type=MPath))
78
+ opt_dst_path = click.option(
79
+ "--dst-path", type=click.Path(path_type=MPath), default=".", show_default=True
80
+ )
81
+ opt_thumbnail_dir = click.option(
82
+ "--thumbnail-dir", type=click.Path(path_type=MPath), default=None, show_default=True
83
+ )
84
+ opt_blacklist = click.option(
85
+ "--blacklist",
86
+ type=click.Path(path_type=MPath),
87
+ default="s3://eox-mhub-cache/blacklist.txt",
88
+ show_default=True,
89
+ )
90
+ opt_s2_l2a_bands = click.option(
91
+ "--l2a-bands",
92
+ type=click.STRING,
93
+ callback=_str_to_l2a_bands,
94
+ help=f"List of L2A bands to be used. (Available bands: {','.join([band.name for band in L2ABand])})",
95
+ show_default=True,
96
+ default="B04,B03,B02",
97
+ )
98
+ opt_assets_rgb = click.option(
99
+ "--assets",
100
+ "-a",
101
+ type=click.STRING,
102
+ nargs=3,
103
+ default=["red", "green", "blue"],
104
+ show_default=True,
105
+ )
106
+ opt_resolution = click.option(
107
+ "--resolution",
108
+ type=click.Choice(list(Resolution.__members__.keys())),
109
+ default="original",
110
+ show_default=True,
111
+ callback=_str_to_resolution,
112
+ help="Resample assets to this resolution in meter.",
113
+ )
114
+ opt_rio_profile = click.option(
115
+ "--rio-profile",
116
+ type=click.Choice(list(rio_profiles.keys())),
117
+ default="cog_deflate",
118
+ callback=_str_to_rio_profile,
119
+ help="Available rasterio profiles for raster assets.",
120
+ )
121
+ opt_mask_footprint = click.option(
122
+ "--mask-footprint", is_flag=True, help="Mask by product footprint."
123
+ )
124
+ opt_mask_clouds = click.option("--mask-clouds", is_flag=True, help="Mask out clouds.")
125
+ opt_mask_snow_ice = click.option(
126
+ "--mask-snow-ice", is_flag=True, help="Mask out snow and ice."
127
+ )
128
+ opt_mask_cloud_probability_threshold = click.option(
129
+ "--mask-cloud-probability-threshold",
130
+ type=click.INT,
131
+ default=100,
132
+ help="Mask out pixels with cloud probability over value.",
133
+ show_default=True,
134
+ )
135
+ opt_mask_snow_probability_threshold = click.option(
136
+ "--mask-snow-probability-threshold",
137
+ type=click.INT,
138
+ default=100,
139
+ help="Mask out pixels with snow probability over value.",
140
+ show_default=True,
141
+ )
142
+ opt_mask_scl_classes = click.option(
143
+ "--mask-scl-classes",
144
+ type=click.STRING,
145
+ callback=_str_to_list,
146
+ help=f"Available classes: {', '.join([scene_class.name for scene_class in SceneClassification])}",
147
+ )
148
+ opt_brdf_model = click.option(
149
+ "--brdf-model",
150
+ type=click.Choice([model.name for model in BRDFModels]),
151
+ default=BRDFModels.HLS,
152
+ callback=_brdf_model_str_to_brdf,
153
+ show_default=True,
154
+ help="BRDF model.",
155
+ )
156
+ opt_brdf_weight = click.option(
157
+ "--brdf-weight",
158
+ type=click.FLOAT,
159
+ default=1.0,
160
+ show_default=True,
161
+ help="BRDF model weight.",
162
+ )
163
+ opt_mgrs_tile = click.option("--mgrs-tile", type=click.STRING)
164
+ opt_start_time = click.option(
165
+ "--start-time", type=click.STRING, callback=_str_to_datetime, help="Start time"
166
+ )
167
+ opt_end_time = click.option(
168
+ "--end-time", type=click.STRING, callback=_str_to_datetime, help="End time"
169
+ )
170
+ opt_archive = click.option(
171
+ "--archive",
172
+ type=click.Choice([archive.name for archive in KnownArchives]),
173
+ default="S2AWS_COG",
174
+ help="Archive to read from.",
175
+ callback=_archive_name_to_archive_cls,
176
+ )
177
+ opt_collection = click.option(
178
+ "--collection",
179
+ type=click.STRING,
180
+ help="Data collection to be queried.",
181
+ )
182
+ opt_endpoint = click.option(
183
+ "--endpoint",
184
+ type=click.STRING,
185
+ help="Search endpoint.",
186
+ )
187
+ opt_catalog_json = click.option(
188
+ "--catalog-json",
189
+ type=click.Path(path_type=MPath),
190
+ help="JSON file for a static catalog.",
191
+ )
192
+ opt_name = click.option("--name", type=click.STRING, help="Static catalog name.")
193
+ opt_description = click.option(
194
+ "--description", type=click.STRING, help="Static catalog description."
195
+ )
196
+ opt_assets = click.option(
197
+ "--assets",
198
+ type=click.STRING,
199
+ callback=_str_to_list,
200
+ help="STAC item assets.",
201
+ )
202
+ opt_assets_dst_resolution = click.option(
203
+ "--assets-dst-resolution",
204
+ type=click.Choice(list(Resolution.__members__.keys())),
205
+ default="original",
206
+ show_default=True,
207
+ callback=_str_to_resolution,
208
+ help="Resample assets to this resolution in meter.",
209
+ )
210
+ opt_assets_dst_rio_profile = click.option(
211
+ "--assets-dst-rio-profile",
212
+ type=click.Choice(list(rio_profiles.keys())),
213
+ default="cog_deflate",
214
+ callback=_str_to_rio_profile,
215
+ help="Available rasterio profiles for raster assets.",
216
+ )
217
+ opt_copy_metadata = click.option(
218
+ "--copy-metadata", is_flag=True, help="Download granule metadata and QI bands."
219
+ )
220
+ opt_overwrite = click.option(
221
+ "--overwrite", "-o", is_flag=True, help="Overwrite existing files."
222
+ )
223
+ opt_dump_detector_footprints = click.option(
224
+ "--dump-detector-footprints",
225
+ is_flag=True,
226
+ help="Also dump products detector footprints.",
227
+ )
228
+
229
+ opt_out_dtype = click.option(
230
+ "--out-dtype", default="uint8", help="Out dType string; default: uint8"
231
+ )
232
+
233
+ opt_brdf_log10 = click.option(
234
+ "--brdf-log10",
235
+ is_flag=True,
236
+ help="Flag to switch BRDF input band convertion to log10. Default: False",
237
+ )
238
+
239
+ opt_brdf_detector_iter = click.option(
240
+ "--brdf-detector-iter",
241
+ is_flag=True,
242
+ help="Switch to switch if the brdf correction should be iterated over the detector footprints or merge them prefering higher angle value. Default: False",
243
+ )
@@ -0,0 +1,77 @@
1
+ from typing import List
2
+ import click
3
+ import numpy as np
4
+ import pystac
5
+ from mapchete.cli.options import opt_debug
6
+ from mapchete.io import rasterio_open
7
+ from mapchete.path import MPath
8
+
9
+ from mapchete_eo.cli import options_arguments
10
+ from mapchete_eo.io.profiles import COGDeflateProfile
11
+ from mapchete_eo.platforms.sentinel2.brdf.config import BRDFModels
12
+ from mapchete_eo.platforms.sentinel2.config import BRDFConfig
13
+ from mapchete_eo.platforms.sentinel2.product import S2Product
14
+ from mapchete_eo.platforms.sentinel2.metadata_parser import Resolution
15
+ from mapchete_eo.platforms.sentinel2.types import L2ABand
16
+
17
+
18
+ @click.command()
19
+ @options_arguments.arg_stac_item
20
+ @options_arguments.opt_dst_path
21
+ @options_arguments.opt_s2_l2a_bands
22
+ @options_arguments.opt_resolution
23
+ @options_arguments.opt_brdf_model
24
+ @options_arguments.opt_dump_detector_footprints
25
+ @options_arguments.opt_brdf_detector_iter
26
+ @opt_debug
27
+ def s2_brdf(
28
+ stac_item: MPath,
29
+ dst_path: MPath,
30
+ l2a_bands: List[L2ABand] = [L2ABand.B04, L2ABand.B03, L2ABand.B02],
31
+ resolution: Resolution = Resolution["120m"],
32
+ brdf_model: BRDFModels = BRDFModels.HLS,
33
+ dump_detector_footprints=False,
34
+ brdf_detector_iter: bool = False,
35
+ **_,
36
+ ):
37
+ """Generate 8bit RGB image from Sentinel-2 product."""
38
+ item = pystac.Item.from_file(stac_item)
39
+ product = S2Product.from_stac_item(item)
40
+ if not resolution.value:
41
+ resolution = Resolution["10m"]
42
+ grid = product.metadata.grid(resolution)
43
+ click.echo(product)
44
+ for band in l2a_bands:
45
+ if dump_detector_footprints:
46
+ out_path = (
47
+ dst_path / stac_item.without_suffix().name
48
+ + f"_footprints_{band.name}_{resolution}.tif"
49
+ )
50
+ click.echo(
51
+ f"write detector footprint for band {band.name} to {str(out_path)}"
52
+ )
53
+ product.metadata.detector_footprints(band, grid).to_file(out_path)
54
+ out_path = (
55
+ dst_path / stac_item.without_suffix().name
56
+ + f"_brdf_{band.name}_{resolution}.tif"
57
+ )
58
+ click.echo(
59
+ f"write BRDF correction grid for band {band.name} to {str(out_path)}"
60
+ )
61
+ with rasterio_open(
62
+ out_path,
63
+ "w",
64
+ **COGDeflateProfile(grid.to_dict(), count=1, dtype=np.float32),
65
+ ) as dst:
66
+ dst.write(
67
+ product.read_brdf_grid(
68
+ band,
69
+ grid=grid,
70
+ brdf_config=BRDFConfig(
71
+ model=brdf_model,
72
+ resolution=resolution,
73
+ per_detector_correction=brdf_detector_iter,
74
+ ),
75
+ ),
76
+ 1,
77
+ )