Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
source:
type: swift
kwargs:
username: !env{{OS_USERNAME_DOWNLOAD}}
password: "!env{{OS_PASSWORD_DOWNLOAD}}"
tenant_name: "!env{{OS_TENANT_NAME_DOWNLOAD}}"
tenant_id: "!env{{OS_TENANT_ID_DOWNLOAD}}"
region_name: "!env{{OS_REGION_NAME_DOWNLOAD}}"
auth_url: "!env{{OS_AUTH_URL_DOWNLOAD}}"
auth_version: "!env{{ST_AUTH_VERSION_DOWNLOAD}}"
user_domain_name: !env{{OS_USER_DOMAIN_NAME_DOWNLOAD}}
# target:
# type: swift
# kwargs:
# auth_version: !env{{ST_AUTH_VERSION}}
# auth_url: "!env{{OS_AUTH_URL}}"
# username: "!env{{OS_USERNAME}}"
# password: "!env{{OS_PASSWORD}}"
# tenant_name: !env{{OS_TENANT_NAME}}
# tenant_id: !env{{OS_TENANT_ID}}
# region_name: !env{{OS_REGION_NAME}}
# user_domain_name: !env{{OS_USER_DOMAIN_NAME}}
target:
type: local
kwargs:
storage_path: /mnt/data/target
workdir: /mnt/data/workdir
keep_temp: true
# metadata file to look for in downloaded tar/zip file
metadata_glob: "*GSC*.xml"
# extractors for Product type / level
type_extractor:
# xpath can also be a list of xpaths to be tried one after another
xpath:
- /gsc:report/gsc:opt_metadata/gml:using/eop:EarthObservationEquipment/eop:platform/eop:Platform/eop:shortName/text()
- /gsc:report/gsc:sar_metadata/gml:using/eop:EarthObservationEquipment/eop:platform/eop:Platform/eop:shortName/text()
map: # optional mapping from extracted type name to used product type name
PHR_FUS__3: PH00
level_extractor:
# xpath can also be a list of xpaths to be tried one after another
xpath: substring-after(substring-after(/gsc:report/gsc:opt_metadata/gml:metaDataProperty/gsc:EarthObservationMetaData/eop:parentIdentifier/text(), '/'), '/')
map: # optional mapping
preprocessing:
defaults:
output:
options:
# WarpOptions (see https://gdal.org/python/osgeo.gdal-module.html#WarpOptions)
format: COG
dstSRS: "EPSG:4326"
dstNodata: 0
creationOptions:
- BLOCKSIZE=512
- COMPRESS=DEFLATE
- NUM_THREADS=8
- BIGTIFF=IF_SAFER
- OVERVIEWS=AUTO
types:
KS03:
nested: true
data_file_globs:
- "*.tif"
additional_file_globs:
- "*.rpc"
georeference:
stack_bands:
# stack all bands for each scene in the product
group_by: ".*/(.*)_P..tif"
sort_by: ".*_P(R|G|B|N).tif"
order:
- R
- G
- B
- N
RS02: # as extracted/translated above
# whether the package can contain sub-packages of TARs/ZIPs
nested: true
# glob selectors to look for source images in the source package
data_file_globs:
- "*.TIF"
additional_file_globs:
- "*.rpc"
# a custom preprocessor function to be called on all selected files
# custom_preprocessor:
# path: "path.to.some.module:attribute"
# # TODO: specify args/kwargs and pass meaningful parameters
georeference:
# georeference each file individually
# - type: geotransform # one of geotransform, RPC, GCP, world file
# - type: GCP
stack_bands:
# stack all bands for each scene in the product
group_by: # TODO: figure out a way to get a grouping. e.g: part of the filename using regex?
output:
# define a custom postprocessor function to be called on the processed file
# custom_postprocessor:
# path: "path.to.some.module:attribute"
# # TODO: specify args/kwargs and pass meaningful parameters
CS00:
nested: true
data_file_globs:
- "*.h5"
subdatasets:
data_file_glob: '*/*/*.h5'
subdataset_types:
'//S01/SBI': 'S01_SBI'
georeference:
type: corners
corner_names: ["S01_SBI_Bottom_Left_Geodetic_Coordinates", "S01_SBI_Bottom_Right_Geodetic_Coordinates", "S01_SBI_Top_Left_Geodetic_Coordinates", "S01_SBI_Top_Right_Geodetic_Coordinates"]
orbit_direction_name: Orbit_Direction
force_north_up: false
# gcp_srid:
calc:
formulas:
- inputs:
A:
glob: '*.tif'
band: 1
B:
glob: '*.tif'
band: 2
data_type: Float32
formula: sqrt(A.astype(float)*A.astype(float)+B.astype(float)*B.astype(float))
output_postfix: _proc
nodata_value: 0
output:
options:
# WarpOptions (see https://gdal.org/python/osgeo.gdal-module.html#WarpOptions)
format: "COG"
dstSRS: "EPSG:3857"
dstNodata: 0
creationOptions:
- BLOCKSIZE=512
- COMPRESS=DEFLATE
- LEVEL=6
- OVERVIEWS=AUTO
- NUM_THREADS=8
- BIGTIFF=IF_SAFER
- RESAMPLING=CUBIC
CS01:
nested: true
data_file_globs:
- "*.h5"
subdatasets:
data_file_glob: '*/*.h5'
subdataset_types:
'//S01/SBI': 'S01_SBI'
georeference:
type: corners
# this configuration is still a stub