@@ -11,7 +11,7 @@ This tutorial explains what Spectral Temporal Metrics are, and how to generate t
11
11
12
12
.. admonition :: Info
13
13
14
- *This tutorial uses FORCE v. 3.5 *
14
+ *This tutorial uses FORCE v. 3.7.6 *
15
15
16
16
17
17
What are Spectral Temporal Metrics?
@@ -24,10 +24,11 @@ This can be the annual mean, standard deviation or median.
24
24
Before calculating the statistics, the data is quality filtered, e.g. clouds are removed.
25
25
26
26
.. figure :: img/tutorial-stm-example.png
27
+ :height: 400
27
28
28
29
*STM concept * |copy | *Stefan Ernst *
29
30
30
- It is important to note that STMs are statistical aggregations - and not composites as in *“ we select the full spectrum for the optimal observation” *.
31
+ It is important to note that STMs are statistical aggregations - and not composites as in *" we select the full spectrum for the optimal observation" *.
31
32
32
33
Thus, some care should be taken when dealing with these kinds of metrics: an STM spectrum cannot be interpreted in the classic remote-sensing-textbook sense.
33
34
@@ -62,7 +63,9 @@ It is hard to give a suggestion here, as this is a complex decision, which depen
62
63
63
64
To demonstrate, we are generating annual STMs for entire 2018:
64
65
65
- ``TIME_RANGE = 2018-01-01 2018-12-31 ``
66
+ .. code-block :: bash
67
+
68
+ TIME_RANGE = 2018-01-01 2018-12-31
66
69
67
70
68
71
Sensors
@@ -88,7 +91,9 @@ Bands / Indices
88
91
89
92
We will produce STMs for some spectral bands, as well as some indices:
90
93
91
- ``INDEX = RED NIR SWIR1 NDVI NDBI MNDWI ``
94
+ .. code-block :: bash
95
+
96
+ INDEX = RED NIR SWIR1 NDVI NDBI MNDWI
92
97
93
98
94
99
Outlier detection
@@ -108,9 +113,11 @@ Interpolation
108
113
"""""""""""""
109
114
110
115
Before temporally aggregating the L2 observations, we can interpolate the time series.
111
- Try this out! But for now, let’ s go without:
116
+ Try this out! But for now, let' s go without:
112
117
113
- ``INTERPOLATE = NONE ``
118
+ .. code-block :: bash
119
+
120
+ INTERPOLATE = NONE
114
121
115
122
116
123
STMs
@@ -150,7 +157,7 @@ Currently available are
150
157
+-----+------------------------------------------------+
151
158
152
159
153
- Let’ s go with these metrics for now:
160
+ Let' s go with these metrics for now:
154
161
155
162
.. code-block :: bash
156
163
@@ -165,7 +172,9 @@ By default, HLPS will produce multi-band files for each spectral band/index, i.e
165
172
166
173
If you rather prefer single-band images, i.e. one file for each index and each STM, use
167
174
168
- OUTPUT_EXPLODE = TRUE
175
+ .. code-block :: bash
176
+
177
+ OUTPUT_EXPLODE = TRUE
169
178
170
179
171
180
Other parameters
@@ -182,61 +191,61 @@ Processing
182
191
Processing is straightforward.
183
192
Simply use:
184
193
185
- .. code-block :: bash
194
+ .. code-block :: none
186
195
187
196
force-higher-level /data/europe/stm/stm.prm
188
197
189
- number of processing units: 280
190
- (active tiles: 28, chunks per tile: 10)
191
- ________________________________________
192
- Progress: 100.00%
193
- Time for I/C/O: 087%/008%/004%
194
- ETA: 00y 00m 00d 00h 00m 00s
195
-
196
- ________________________________________
197
- Real time: 00y 00m 00d 00h 19m 05s
198
- Virtual time: 00y 00m 00d 00h 21m 35s
199
- Saved time: 00y 00m 00d 00h 02m 30s
200
-
201
- ________________________________________
202
- Virtual I-time: 00y 00m 00d 00h 18m 53s
203
- Virtual C-time: 00y 00m 00d 00h 01m 47s
204
- Virtual O-time: 00y 00m 00d 00h 00m 55s
205
-
206
- ________________________________________
207
- I-bound time: 00y 00m 00d 00h 17m 10s
208
- C-bound time: 00y 00m 00d 00h 00m 07s
209
- O-bound time: 00y 00m 00d 00h 00m 03s
198
+ $ number of processing units: 280
199
+ $ (active tiles: 28, chunks per tile: 10)
200
+ $ ________________________________________
201
+ $ Progress: 100.00%
202
+ $ Time for I/C/O: 087%/008%/004%
203
+ $ ETA: 00y 00m 00d 00h 00m 00s
204
+ $
205
+ $ ________________________________________
206
+ $ Real time: 00y 00m 00d 00h 19m 05s
207
+ $ Virtual time: 00y 00m 00d 00h 21m 35s
208
+ $ Saved time: 00y 00m 00d 00h 02m 30s
209
+ $
210
+ $ ________________________________________
211
+ $ Virtual I-time: 00y 00m 00d 00h 18m 53s
212
+ $ Virtual C-time: 00y 00m 00d 00h 01m 47s
213
+ $ Virtual O-time: 00y 00m 00d 00h 00m 55s
214
+ $
215
+ $ ________________________________________
216
+ $ I-bound time: 00y 00m 00d 00h 17m 10s
217
+ $ C-bound time: 00y 00m 00d 00h 00m 07s
218
+ $ O-bound time: 00y 00m 00d 00h 00m 03s
210
219
211
220
212
221
After this, we generate a mosaic.
213
222
214
223
With ``OUTPUT_EXPLODE = TRUE ``, you get one image for each requested index and statistical aggregation, i.e. 42 images in our case:
215
224
216
- .. code-block :: bash
225
+ .. code-block :: none
217
226
218
227
force-mosaic /data/europe/stm
219
228
220
- mosaicking 42 products:
221
- 1 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_AVG.tif
222
- 2 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q10.tif
223
- 3 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q25.tif
224
- 4 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q50.tif
225
- ...
226
- 40 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q75.tif
227
- 41 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q90.tif
228
- 42 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_STD.tif
229
-
230
- mosaicking 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_AVG.tif
231
- 26 chips found.
232
-
233
- mosaicking 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q25.tif
234
- 26 chips found.
235
-
236
- ...
237
-
238
- mosaicking 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_AVG.tif
239
- 26 chips found.
229
+ $ mosaicking 42 products:
230
+ $ 1 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_AVG.tif
231
+ $ 2 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q10.tif
232
+ $ 3 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q25.tif
233
+ $ 4 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q50.tif
234
+ $ ...
235
+ $ 40 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q75.tif
236
+ $ 41 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q90.tif
237
+ $ 42 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_STD.tif
238
+ $
239
+ $ mosaicking 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_AVG.tif
240
+ $ 26 chips found.
241
+ $
242
+ $ mosaicking 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q25.tif
243
+ $ 26 chips found.
244
+ $
245
+ $ ...
246
+ $
247
+ $ mosaicking 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_AVG.tif
248
+ $ 26 chips found.
240
249
241
250
242
251
Visualization
@@ -248,60 +257,60 @@ This example here stacks the 50% quantiles of the reflectance bands, as well as
248
257
249
258
For fast visualization, we are computing pyramids.
250
259
251
- .. code-block :: bash
260
+ .. code-block :: none
252
261
253
262
cd /data/europe/stm/mosaic
254
263
force-stack *RED_STM_Q50.vrt *NIR_STM_Q50.vrt *SW1_STM_Q50.vrt stack-bands-STM_Q50.vrt
255
264
force-stack *NDB_STM_Q90.vrt *NDV_STM_Q90.vrt *MNW_STM_Q90.vrt stack-indices-STM_Q90.vrt
256
- ls * .vrt | parallel force-pyramid {}
257
-
258
- file 1:
259
- /data/europe/stm/mosaic
260
- 2018-2018_001-365_HL_TSA_LNDLG_RED_STM_Q50.vrt
261
- 9000 4000 1
262
- file 2:
263
- /data/europe/stm/mosaic
264
- 2018-2018_001-365_HL_TSA_LNDLG_NIR_STM_Q50.vrt
265
- 9000 4000 1
266
- file 3:
267
- /data/europe/stm/mosaic
268
- 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q50.vrt
269
- 9000 4000 1
270
-
271
- Same number of bands detected. Stacking by band.
272
-
273
- Band 0001: 2018-2018_001-365_HL_TSA_LNDLG_RED_STM_Q50.vrt band 1
274
- Band 0002: 2018-2018_001-365_HL_TSA_LNDLG_NIR_STM_Q50.vrt band 1
275
- Band 0003: 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q50.vrt band 1
276
-
277
- file 1:
278
- /data/europe/stm/mosaic
279
- 2018-2018_001-365_HL_TSA_LNDLG_NDB_STM_Q90.vrt
280
- 9000 4000 1
281
- file 2:
282
- /data/europe/stm/mosaic
283
- 2018-2018_001-365_HL_TSA_LNDLG_NDV_STM_Q90.vrt
284
- 9000 4000 1
285
- file 3:
286
- /data/europe/stm/mosaic
287
- 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q90.vrt
288
- 9000 4000 1
289
-
290
- Same number of bands detected. Stacking by band.
291
-
292
- Band 0001: 2018-2018_001-365_HL_TSA_LNDLG_NDB_STM_Q90.vrt band 1
293
- Band 0002: 2018-2018_001-365_HL_TSA_LNDLG_NDV_STM_Q90.vrt band 1
294
- Band 0003: 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q90.vrt band 1
295
-
296
- computing pyramids for 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q10.vrt
297
- 0...10...20...30...40...50...60...70...80...90...100 - done.
298
- computing pyramids for 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q25.vrt
299
- 0...10...20...30...40...50...60...70...80...90...100 - done.
300
- ...
301
- computing pyramids for stack-bands-STM_Q50.vrt
302
- 0...10...20...30...40...50...60...70...80...90...100 - done.
303
- computing pyramids for stack-indices-STM_Q90.vrt
304
- 0...10...20...30...40...50...60...70...80...90...100 - done.
265
+ force-pyramid *.vrt
266
+
267
+ $ file 1:
268
+ $ /data/europe/stm/mosaic
269
+ $ 2018-2018_001-365_HL_TSA_LNDLG_RED_STM_Q50.vrt
270
+ $ 9000 4000 1
271
+ $ file 2:
272
+ $ /data/europe/stm/mosaic
273
+ $ 2018-2018_001-365_HL_TSA_LNDLG_NIR_STM_Q50.vrt
274
+ $ 9000 4000 1
275
+ $ file 3:
276
+ $ /data/europe/stm/mosaic
277
+ $ 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q50.vrt
278
+ $ 9000 4000 1
279
+ $
280
+ $ Same number of bands detected. Stacking by band.
281
+ $
282
+ $ Band 0001: 2018-2018_001-365_HL_TSA_LNDLG_RED_STM_Q50.vrt band 1
283
+ $ Band 0002: 2018-2018_001-365_HL_TSA_LNDLG_NIR_STM_Q50.vrt band 1
284
+ $ Band 0003: 2018-2018_001-365_HL_TSA_LNDLG_SW1_STM_Q50.vrt band 1
285
+ $
286
+ $ file 1:
287
+ $ /data/europe/stm/mosaic
288
+ $ 2018-2018_001-365_HL_TSA_LNDLG_NDB_STM_Q90.vrt
289
+ $ 9000 4000 1
290
+ $ file 2:
291
+ $ /data/europe/stm/mosaic
292
+ $ 2018-2018_001-365_HL_TSA_LNDLG_NDV_STM_Q90.vrt
293
+ $ 9000 4000 1
294
+ $ file 3:
295
+ $ /data/europe/stm/mosaic
296
+ $ 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q90.vrt
297
+ $ 9000 4000 1
298
+ $
299
+ $ Same number of bands detected. Stacking by band.
300
+ $
301
+ $ Band 0001: 2018-2018_001-365_HL_TSA_LNDLG_NDB_STM_Q90.vrt band 1
302
+ $ Band 0002: 2018-2018_001-365_HL_TSA_LNDLG_NDV_STM_Q90.vrt band 1
303
+ $ Band 0003: 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q90.vrt band 1
304
+ $
305
+ $ computing pyramids for 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q10.vrt
306
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
307
+ $ computing pyramids for 2018-2018_001-365_HL_TSA_LNDLG_MNW_STM_Q25.vrt
308
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
309
+ $ ...
310
+ $ computing pyramids for stack-bands-STM_Q50.vrt
311
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
312
+ $ computing pyramids for stack-indices-STM_Q90.vrt
313
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
305
314
306
315
307
316
.. figure :: img/tutorial-stm-qgis.jpg
0 commit comments