Skip to content

Commit 0a071cf

Browse files
Added forest disturbance classification scripts (#351)
1 parent cfdd613 commit 0a071cf

File tree

13 files changed

+2505
-0
lines changed

13 files changed

+2505
-0
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: Forest Disturbance Classification
3+
parent: Sentinel-2
4+
grand_parent: Sentinel
5+
layout: script
6+
nav_exclude: true
7+
scripts:
8+
- - Visualization
9+
- script.js
10+
- - Raw Values
11+
- raw.js
12+
- - Raw Class Probabilities
13+
- raw_prob.js
14+
examples:
15+
- zoom: '16'
16+
lat: '52.67571'
17+
lng: '23.59823'
18+
datasetId: S2L2A
19+
fromTime: '2019-06-04T00%3A00%3A00.000Z'
20+
toTime: '2019-06-04T23%3A59%3A59.999Z'
21+
platform:
22+
- CDSE
23+
- EOB
24+
evalscripturl: https://custom-scripts.sentinel-hub.com/custom-scripts/sentinel-2/forest_disturbance_classification/script.js
25+
---
26+
27+
## General description of the script
28+
29+
This script provides a LightGBM classification which classifies pixels into different forest disturbance classes.
30+
31+
The following classes can be discerned:
32+
33+
<table>
34+
<thead>
35+
<tr>
36+
<th>Value</th>
37+
<th>Color</th>
38+
<th>Label</th>
39+
</tr>
40+
</thead>
41+
<tbody>
42+
<tr>
43+
<td>0</td>
44+
<td style="background-color: #ab6820;"></td>
45+
<td>0 - Bark Beetle</td>
46+
</tr>
47+
<tr>
48+
<td>1</td>
49+
<td style="background-color: #b8b6b4;"></td>
50+
<td>1 - Clear Cut</td>
51+
</tr>
52+
<tr>
53+
<td>2</td>
54+
<td style="background-color: #215728;"></td>
55+
<td>2 - Healthy</td>
56+
</tr>
57+
<tr>
58+
<td>3</td>
59+
<td style="background-color: #b8b6b4;"></td>
60+
<td>3 - Salvage logged (low confidence)</td>
61+
</tr>
62+
<tr>
63+
<td>4</td>
64+
<td style="background-color: #7a2e01;"></td>
65+
<td>4 - Wildfire</td>
66+
</tr>
67+
<tr>
68+
<td>5</td>
69+
<td style="background-color: #4c77ed;"></td>
70+
<td>5 - Windthrow</td>
71+
</tr>
72+
</tbody>
73+
</table>
74+
75+
The classification was trained on ground truth samples in Europe. Namely Germany, Sweden and Spain. For only taking in spectral features as input and not taking disturbance objects into account during the classification, the classification works reasonably well in European areas. One class separation which does not work well is between salvage logged areas and clear cut areas. Because of this in the visualization we have used the same color for both classes.
76+
77+
In general the classification works best in recently disturbed areas.
78+
79+
Also keep in mind that this script is run on all pixels, irrespective of if the pixel was at one point forest or not. The classification however was only trained and is only valid on forest pixels. So if the classification results are used, please make sure to apply a baseline forest mask.
80+
81+
The classification works best on large scale disturbances.
82+
83+
{: .note}
84+
85+
Although the full model did perform reasonably well in accuracy testing (Macro F1 Score of 0.83), it has to be expected that there are major classification errors. This is especially true in areas outside Europe. Use at own caution and always validate results.
86+
87+
### Types of scripts
88+
89+
There are three scripts available. One for visualization, this can be used when streaming the data in application using a WMS or similar.
90+
The visualization script has some optimizations for quicker visualization (e.g. early stopping once the majority class is detected). By default the visualization script also only shows disturbed areas and returns transparent pixels for everything it classifies as healthy forest.
91+
92+
For analytic use there are two other scripts available (Raw and Raw Probabilities). One just returns the classified majority class, the other returns the probabilities of each class from 0-100.
93+
94+
## Description of representative images
95+
96+
| !['Clear cut'](fig/logging-b.png) | !['Clear cut classified'](fig/logging-a.png) |
97+
| :----------------------------------: | :----------: |
98+
| Clear cut area in Sweden | [Explore in CDSE](https://link.dataspace.copernicus.eu/v5c2) |
99+
100+
| !['Bark Beetle'](fig/bark-beetle-b.png) | !['Bark Beetle classified'](fig/bark-beetle-a.png) |
101+
| :----------------------------------: | :----------: |
102+
| Bark Beetle area in Poland | [Explore in CDSE](https://link.dataspace.copernicus.eu/1mb0) |
103+
104+
| !['Windthrow'](fig/wind-b.png) | !['Windthrow classified'](fig/wind-a.png) |
105+
| :----------------------------------: | :----------: |
106+
| Windthrow area in Italy (Storm Vaia) | [Explore in CDSE](https://link.dataspace.copernicus.eu/gjpr) |
107+
108+
| !['Wildfire'](fig/wildfire-b.png) | !['Wildfire classified'](fig/wildfire-a.png) |
109+
| :----------------------------------: | :----------: |
110+
| Wildfire area in Spain | [Explore in CDSE](https://link.dataspace.copernicus.eu/f3va) |
111+
112+
## Author of the script
113+
114+
Jonas Viehweger and Martin Puhm at [Joanneum Research](https://www.joanneum.at/digital/en/research-groups/fernerkundung-und-geoinformation/)
115+
116+
## Credits
117+
118+
Classification developed as part of the [EvoLand](https://www.evo-land.eu/) research project.

sentinel-2/forest_disturbance_classification/raw.js

Lines changed: 794 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)