-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreclassification.qmd
More file actions
92 lines (51 loc) · 5.09 KB
/
reclassification.qmd
File metadata and controls
92 lines (51 loc) · 5.09 KB
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
# Reclassification rules {-}
This section provides a high-level introduction to reclassification rules used in the LUC-Brazil project. This stage implements 27 specialized reclassification rules to refine and standardize land cover classification. Temporal trajectory rules analyze multi-year patterns to detect transitions, enforce consistency, and correct isolated pixel misclassifications. Each rule addresses specific classification challenges such as pasture-agriculture confusion, urban expansion detection, or temporal consistency in perennial crops.
The heart of the system is the reclassification and remapping pipeline, which transforms diverse input classifications into a standardized output schema. The package implements 27 specialized rules organized into the following categories:
1. Forest Rules: Uses PRODES to distinguish between Natural Forests and Secondary Vegetation;
2. Agriculture Rules: Uses TerraClass to improve the agricultural classes, especially in the case of Perennial and Semi-Perennial Agriculture;
3. Infrastructure Rules: Includes urban and mining areas from TerraClass;
4. Water Rules: include water mask from TerraClass;
5. Multi-year transitions: considers three consecutive years to ensure consistency of more difficult classes (e.g., conflicts between Shrubby Pasture and Secondary Vegetation).
| Intermediate Code | Final Class | Label Description |
| --- | --- | --- |
| 100 | 1 | Two-cycle agriculture |
| 101 | 2 | Semi-perennial agriculture |
| 102 | 3 | Water |
| 103 | 4 | Forest |
| 106 | 5 | Silviculture |
| 107 | 6 | Secondary vegetation |
| 108 | 7 | Mining |
| 109 | 8 | Urban area |
| 111 | 9 | Natural non-forest |
| 104 | 10 | Pasture |
| 105 | 11 | Wetlands |
| 110 | 12 | Deforestation |
| 112 | 13 | Perennial agriculture |
The reclassification rules fall into six functional categories:
CLASSIFICATION["Initial Classification<br>From Stage 2 + Stage 4"]
## Base Mask Preparation
Base Mask Preparation is a key part in the classification pipeline. It prepares reference masks from two authoritative external datasets: PRODES deforestation monitoring data and Terraclass land use and land cover maps. These base masks serve as ground truth references for all downstream processing stages.
The base mask preparation includes geomtrically adjusting the PRODES deforestation mask to remove some inconsistencies in the border pixels which distort the overall statistics.
## Water Consistency
:
1. **Water Consistency (Lines 32-58)**: Processes a 3-year window centered on 2019, identifying pixels classified as water across all three years. Output is versioned as `temporal-mask-1`.
2. **Perene Trajectory (Lines 61-107)**: For each of 5 specific years, loads Terraclass data from surrounding years (year±1) and validates perene classifications. Output is versioned as `temporal-mask-2`.
3. **VS-Pasture Classification (Lines 110-161)**: For years 2001-2021, analyzes 3-year windows to identify vegetation-secondary pasture transitions. Output is versioned as `temporal-mask-3`.
4. **Annual Agriculture (Lines 164-192)**: Builds a temporal brick from all years and applies agricultural detection. The brick is then split back into individual years. Output is versioned as `temporal-mask-4`.
## Stage 5: Year-Specific Mask Generation {-}
The final stage generates individual annual masks for years 2000-2022 by applying 19-24 sequential reclassification rules to the temporally-processed classifications. Each year has a dedicated script (e.g., `mask-2015.R`, `mask-2020.R`) that follows a common 22-step pipeline.
## Perennial Agriculture Rule
This rule validates perennial crop classifications by consulting TerraClass reference data from surrounding years (year-1 and year+1). Perennial crop pixels are only retained if TerraClass confirms their presence in adjacent years, reducing false positives.
The rule targets specific years where TerraClass surveys are available:
| Target Year | TerraClass Before (year-1) | TerraClass After (year+1) | Rationale |
| --- | --- | --- | --- |
| 2009 | 2008 | 2010 | Between consecutive TerraClass surveys |
| 2011 | 2010 | 2012 | Between consecutive surveys |
| 2013 | 2012 | 2014 | Between consecutive surveys |
| 2019 | 2018 | 2020 | Between consecutive surveys |
| 2021 | 2020 | 2022 | Between consecutive surveys |
## Secondary Vegetation-Pasture Rule
This analyzes vegetation-secondary (SV) to pasture transitions by examining 3-year trajectories. This rule identifies pixels classified as SV that are surrounded by pasture classifications in adjacent years, helping distinguish true secondary vegetation from misclassified pasture areas.
The rule processes 21 consecutive years from 2001 to 2025, creating overlapping 3-year windows. For each target year, the algorithm examines year-1, year, and year+1 classifications to detect VS-pasture patterns.
## Annual Agriculture Rule
This rule identifies annual agriculture patterns by analyzing the complete temporal series of all years simultaneously. Unlike the previous rules that process specific year subsets, this rule considers all years and applies agricultural detection logic across the entire time series.