@@ -11,7 +11,7 @@ This tutorial introduces the Time Series Analysis (TSA) submodule of the FORCE H
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
Why interpolation?
@@ -78,24 +78,20 @@ Parameterfile
78
78
79
79
We start by generating an empty TSA parameterfile, and rename the file.
80
80
81
- .. code-block :: bash
81
+ .. code-block :: none
82
82
83
83
mkdir /data/europe/interpolation
84
- force-parameter /data/europe/interpolation TSA 1
85
- cd /data/europe/interpolation
86
- mv TSA-skeleton.prm tsi.prm
84
+ force-parameter /data/europe/interpolation/tsi.prm TSA
87
85
88
- TSA
89
- An empty parameter file skeleton was written to
90
- /data/europe/interpolation/TSA-skeleton.prm
91
- Note that all parameters need to be given, even though some may not be used
92
- with your specific parameterization.
93
- You should rename the file, e.g. my-first-TSA.prm.
94
- Parameterize according to your needs and run with
95
- force-higher-level /data/europe/interpolation/my-first-TSA.prm
86
+ $ An empty parameter file skeleton was written to
87
+ $ /data/europe/interpolation/tsi.prm
88
+ $ Note that all parameters need to be given, even though some may not be used
89
+ $ with your specific parameterization.
90
+ $ Parameterize according to your needs and run with
91
+ $ force-higher-level /data/europe/interpolation/tsi.prm
96
92
97
93
98
- If you prefer a more compact parameterfile without all the comments, use `` 0 `` instead of `` 1 `` as the last parameter .
94
+ If you prefer a more compact parameterfile without all the comments, use the `` -c `` option .
99
95
The full set of parameters is also documented here: :ref: `tsa-param `.
100
96
101
97
@@ -120,16 +116,16 @@ Analysis mask
120
116
As we are only interested in the land surface - and there is a lot of water around Crete - we use a processing mask.
121
117
Have a look at the :ref: `tut-mask ` tutorial for further details.
122
118
123
- .. code-block :: bash
119
+ .. code-block :: none
124
120
125
121
mkdir -p /data/europe/masks
126
122
cp /data/europe/level2/datacube-definition.prj -t /data/europe/masks
127
- force-cube /data/gis/admin/crete.gpkg /data/europe/masks rasterize 30
123
+ force-cube -o /data/europe/mask -s 30 /data/ gis/admin/crete.gpkg
128
124
129
- 0...10...20...30...40...50...60...70...80...90...100 - done.
130
- 0...10...20...30...40...50...60...70...80...90...100 - done.
131
- 0...10...20...30...40...50...60...70...80...90...100 - done.
132
- ...
125
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
126
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
127
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
128
+ $ ...
133
129
134
130
135
131
In the parameterfile, use the masks like this:
@@ -167,17 +163,20 @@ There are different ways to obtain these values, e.g. by generating, and filteri
167
163
The easiest way, however, is to use ``force-tile-extent `` with a vector geometry.
168
164
Example for Crete, Greece:
169
165
170
- .. code-block :: bash
166
+ .. code-block :: none
171
167
172
- force-tile-extent /data/gis/admin/crete.gpkg /data/europe/level2 /data/europe/interpolation/crete.txt
168
+ force-tile-extent \
169
+ /data/gis/admin/crete.gpkg \
170
+ /data/europe/level2 \
171
+ /data/europe/interpolation/crete.txt
173
172
174
- Suggested Processing extent:
175
- X_TILE_RANGE = 103 111
176
- Y_TILE_RANGE = 101 105
177
-
178
- Processing extent is not square.
179
- Suggest to use the tile allow-list:
180
- FILE_TILE = /data/europe/interpolation/crete.txt
173
+ $ Suggested Processing extent:
174
+ $ X_TILE_RANGE = 103 111
175
+ $ Y_TILE_RANGE = 101 105
176
+ $
177
+ $ Processing extent is not square.
178
+ $ Suggest to use the tile allow-list:
179
+ $ FILE_TILE = /data/europe/interpolation/crete.txt
181
180
182
181
183
182
Block size
@@ -186,7 +185,7 @@ Block size
186
185
.. tip ::
187
186
188
187
The block size is a parameter that you should only adjust if you are running in RAM-shortages.
189
- First, try the default value and don’ t worry*
188
+ First, try the default value and don' t worry*
190
189
191
190
However, if the program is *killed * by the system, this can be mitigated by adjusting ``BLOCK_SIZE ``.
192
191
@@ -210,7 +209,7 @@ By default, FORCE screens for nodata values, various cloud types, cloud shadows,
210
209
211
210
212
211
In addition, recognizing that cloud masks are never perfect, TSA offers an outlier detection routine.
213
- This screens each pixel’ s time series and might be used to remove undetected cloud, cloud shadow, or snow remnants.
212
+ This screens each pixel' s time series and might be used to remove undetected cloud, cloud shadow, or snow remnants.
214
213
215
214
The outlier detection is iteratively removing outliers until the time series noise is smaller than the given value.
216
215
Note however: this method might also remove some *valid * data points, e.g. mowing events in intensively managed grasslands.
@@ -230,7 +229,7 @@ For our purpose, using this option is fine, thus, let's keep the default values:
230
229
Temporal extent, Sensor, Index
231
230
""""""""""""""""""""""""""""""
232
231
233
- To eventually generate a long term animation, let’ s use 30 years of Landsat data:
232
+ To eventually generate a long term animation, let' s use 30 years of Landsat data:
234
233
235
234
.. code-block :: bash
236
235
@@ -263,7 +262,7 @@ In order to generate a nice-looking and information-rich animation, we are using
263
262
Interpolation
264
263
"""""""""""""
265
264
266
- Now, let’ s define the interpolation parameters.
265
+ Now, let' s define the interpolation parameters.
267
266
268
267
We wil be using the RBF interpolation to create a smoothed time series with 16-day interpolation steps.
269
268
@@ -317,7 +316,7 @@ The progress bar will tell you how much time is spent for reading, computing, an
317
316
This helps you identify if your job is e.g. input-limited.
318
317
You might want to adjust the settings accordingly (also note that you may have more or less CPUs than me).
319
318
320
- Please also note: fairly often, inexperienced users tend to overdo parallel reads/writes beyond a value that is reasonable - if reading/writing doesn’ t accelerate when you add more CPUs, this is likely the case (you might even slow down your job by overdoing I/O).
319
+ Please also note: fairly often, inexperienced users tend to overdo parallel reads/writes beyond a value that is reasonable - if reading/writing doesn' t accelerate when you add more CPUs, this is likely the case (you might even slow down your job by overdoing I/O).
321
320
322
321
.. code-block :: bash
323
322
@@ -331,55 +330,55 @@ Processing
331
330
332
331
Processing is straightforward:
333
332
334
- .. code-block :: bash
333
+ .. code-block :: none
335
334
336
335
force-higher-level /data/europe/interpolation/tsi.prm
337
336
338
337
339
- number of processing units: 280
340
- (active tiles: 28, chunks per tile: 10)
341
- ________________________________________
342
- Progress: 100.00%
343
- Time for I/C/O: 054%/037%/008%
344
- ETA: 00y 00m 00d 00h 00m 00s
345
-
346
- ________________________________________
347
- Real time: 00y 00m 00d 00h 58m 41s
348
- Virtual time: 00y 00m 00d 01h 32m 54s
349
- Saved time: 00y 00m 00d 00h 34m 13s
350
-
351
- ________________________________________
352
- Virtual I-time: 00y 00m 00d 00h 50m 30s
353
- Virtual C-time: 00y 00m 00d 00h 34m 31s
354
- Virtual O-time: 00y 00m 00d 00h 07m 53s
355
-
356
- ________________________________________
357
- I-bound time: 00y 00m 00d 00h 23m 42s
358
- C-bound time: 00y 00m 00d 00h 07m 10s
359
- O-bound time: 00y 00m 00d 00h 00m 26s
338
+ $ number of processing units: 280
339
+ $ (active tiles: 28, chunks per tile: 10)
340
+ $ ________________________________________
341
+ $ Progress: 100.00%
342
+ $ Time for I/C/O: 054%/037%/008%
343
+ $ ETA: 00y 00m 00d 00h 00m 00s
344
+ $
345
+ $ ________________________________________
346
+ $ Real time: 00y 00m 00d 00h 58m 41s
347
+ $ Virtual time: 00y 00m 00d 01h 32m 54s
348
+ $ Saved time: 00y 00m 00d 00h 34m 13s
349
+ $
350
+ $ ________________________________________
351
+ $ Virtual I-time: 00y 00m 00d 00h 50m 30s
352
+ $ Virtual C-time: 00y 00m 00d 00h 34m 31s
353
+ $ Virtual O-time: 00y 00m 00d 00h 07m 53s
354
+ $
355
+ $ ________________________________________
356
+ $ I-bound time: 00y 00m 00d 00h 23m 42s
357
+ $ C-bound time: 00y 00m 00d 00h 07m 10s
358
+ $ O-bound time: 00y 00m 00d 00h 00m 26s
360
359
361
360
362
361
After this, we do some postprocessing for simplified data handling, and to prepare the data for ingestion into the QGIS plugins.
363
362
364
363
First, we generate a mosaic:
365
364
366
- .. code-block :: bash
365
+ .. code-block :: none
367
366
368
367
force-mosaic /data/europe/interpolation
369
368
370
- mosaicking 3 products:
371
- 1 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.tif
372
- 2 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.tif
373
- 3 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.tif
374
-
375
- mosaicking 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.tif
376
- 27 chips found.
377
-
378
- mosaicking 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.tif
379
- 27 chips found.
380
-
381
- mosaicking 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.tif
382
- 27 chips found.
369
+ $ mosaicking 3 products:
370
+ $ 1 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.tif
371
+ $ 2 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.tif
372
+ $ 3 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.tif
373
+ $
374
+ $ mosaicking 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.tif
375
+ $ 27 chips found.
376
+ $
377
+ $ mosaicking 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.tif
378
+ $ 27 chips found.
379
+ $
380
+ $ mosaicking 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.tif
381
+ $ 27 chips found.
383
382
384
383
385
384
Then, we build a four-dimensional stack from the three tasseled cap components.
@@ -391,50 +390,49 @@ This data model is a prerequisite to the usage of the following QGIS plugins.
391
390
For very long time series, ``force-stack `` still seems a bit slow - but at least it works...
392
391
393
392
394
- .. code-block :: bash
393
+ .. code-block :: none
395
394
396
395
cd mosaic
397
396
force-stack *TCB*TSI.vrt *TCG*TSI.vrt *TCW*TSI.vrt 4D-Tasseled-Cap-TSI.vrt
398
397
399
- file 1:
400
- /data/europe/interpolation/mosaic
401
- 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt
402
- 9000 4000 684
403
- file 2:
404
- /data/europe/interpolation/mosaic
405
- 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt
406
- 9000 4000 684
407
- file 3:
408
- /data/europe/interpolation/mosaic
409
- 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt
410
- 9000 4000 684
411
-
412
- Same number of bands detected. Stacking by band.
413
-
414
- Band 0001: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 1
415
- Band 0002: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 1
416
- Band 0003: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 1
417
- Band 0004: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 2
418
- Band 0005: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 2
419
- Band 0006: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 2
420
- Band 0007: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 3
421
- Band 0008: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 3
422
- Band 0009: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 3
423
- ...
424
- Band 2050: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 684
425
- Band 2051: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 684
426
- Band 2052: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 684
398
+ $ file 1:
399
+ $ /data/europe/interpolation/mosaic
400
+ $ 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt
401
+ $ 9000 4000 684
402
+ $ file 2:
403
+ $ /data/europe/interpolation/mosaic
404
+ $ 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt
405
+ $ 9000 4000 684
406
+ $ file 3:
407
+ $ /data/europe/interpolation/mosaic
408
+ $ 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt
409
+ $ 9000 4000 684
410
+ $
411
+ $ Same number of bands detected. Stacking by band.
412
+ $
413
+ $ Band 0001: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 1
414
+ $ Band 0002: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 1
415
+ $ Band 0003: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 1
416
+ $ Band 0004: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 2
417
+ $ Band 0005: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 2
418
+ $ Band 0006: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 2
419
+ $ Band 0007: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 3
420
+ $ Band 0008: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 3
421
+ $ Band 0009: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 3
422
+ $ ...
423
+ $ Band 2050: 1990-2019_001-365_HL_TSA_LNDLG_TCB_TSI.vrt band 684
424
+ $ Band 2051: 1990-2019_001-365_HL_TSA_LNDLG_TCG_TSI.vrt band 684
425
+ $ Band 2052: 1990-2019_001-365_HL_TSA_LNDLG_TCW_TSI.vrt band 684
427
426
428
427
429
428
For rapid display, we compute pyramids:
430
429
431
- .. code-block :: bash
430
+ .. code-block :: none
432
431
433
432
force-pyramid 4D-Tasseled-Cap-TSI.vrt
434
433
435
- /data/europe/interpolation/mosaic/4D-Tasseled-Cap-TSI.vrt
436
- computing pyramids for 4D-Tasseled-Cap-TSI.vrt
437
- 0...10...20...30...40...50...60...70...80...90...100 - done.
434
+ $ computing pyramids for 4D-Tasseled-Cap-TSI.vrt
435
+ $ 0...10...20...30...40...50...60...70...80...90...100 - done.
438
436
439
437
440
438
Visualization
0 commit comments