Formulas¶
This page provides the mathematical formulas used in the Spatiotemporal LULC Analysis plugin.
Notation¶
| Symbol | Definition |
|---|---|
| \(\Omega_t\) | Set of valid pixels at time \(t\) (after NoData and AOI masking) |
| \(L_t(p)\) | Class label of pixel \(p\) at time \(t\) |
| \(A_{px}\) | Area per pixel in selected units |
| \(\mathbf{1}[\cdot]\) | Indicator function (1 if condition true, 0 otherwise) |
Area by Class¶
Pixel Count¶
The number of pixels belonging to class \(k\) at time \(t\):
This counts all valid pixels where the class label equals \(k\).
Area¶
Convert pixel count to area using the pixel area factor:
Where \(A_{px}\) depends on output units:
| Units | \(A_{px}\) Value |
|---|---|
| Pixels | 1 |
| Square meters | pixel width × pixel height (in meters) |
| Square kilometers | pixel area in m² ÷ 1,000,000 |
Percentage¶
Class percentage of total valid area:
Interval Metrics¶
Valid Pixel Set¶
For interval \(t_0 \to t_1\), only pixels valid in both years are analyzed:
Total Pixels¶
Changed Pixels¶
Count pixels where the class differs between years:
Unchanged Pixels¶
Gain and Loss¶
Gain¶
Pixels that transitioned into class \(k\):
Only pixels that actually changed class are counted as gains.
Loss¶
Pixels that transitioned out of class \(k\):
Net Change¶
- Positive: Class expanded
- Negative: Class contracted
- Zero: Balanced turnover
Gross Change¶
Total turnover for the class, regardless of direction.
Transition Matrix¶
Matrix Definition¶
The transition matrix \(M\) counts pixel movements between classes:
Where:
- \(i\) = class at time \(t_0\) (row index)
- \(j\) = class at time \(t_1\) (column index)
- \(M_{i,j}\) = count of pixels moving from \(i\) to \(j\)
Matrix Properties¶
Diagonal elements (\(M_{i,i}\)): Pixels that stayed in class \(i\) (persistence)
Off-diagonal elements (\(M_{i,j}\) where \(i \ne j\)): Pixels that changed from \(i\) to \(j\)
Row sum: Total area of class \(i\) at \(t_0\)
Column sum: Total area of class \(j\) at \(t_1\)
Relationship to Gain/Loss¶
Top Transitions¶
Total Changed Area¶
Sum of all off-diagonal elements:
Transition Percentage¶
Share of total change for each transition:
Transition Area¶
Change Intensity¶
Interval Intensity¶
Proportion of pixels that changed within the interval:
Range: 0 (no change) to 1 (complete change)
Annual Intensity¶
Average per-year change rate:
Where \((t_1 - t_0)\) is the number of years in the interval.
Change Frequency Raster¶
Per-Pixel Frequency¶
For a time series with \(T\) observations, the change frequency at pixel \(p\):
Conditions¶
- Computed only if \(p\) is valid in all years
- NoData (-1) if \(p\) is invalid in any year
- Range: 0 to \(T-1\)
Change Hotspots¶
Point Generation¶
Changed pixels are converted to point events with unit weight at their centroid locations.
Kernel Density Estimation¶
The density at location \((x, y)\) is:
Where:
- \(n\) = number of change points (up to 50,000)
- \(K\) = Gaussian kernel function
- \(d_i\) = distance from \((x, y)\) to point \(i\)
- \(h\) = bandwidth (1000 map units)
Gaussian Kernel¶
Unit Conversions¶
Area Factor¶
The area factor \(A_{px}\) converts pixel counts to area:
Where:
- \(X_{\text{res}}\) = pixel width (from raster metadata)
- \(Y_{\text{res}}\) = pixel height (from raster metadata)
- \(S\) = scale factor based on CRS units and output units
Scale Factor¶
| CRS Units | Output Units | Scale Factor |
|---|---|---|
| Meters | Pixels | 0 (use count) |
| Meters | m² | 1 |
| Meters | km² | 1/1,000,000 |
| Degrees | m² | Requires projection |
Summary Table¶
| Metric | Formula | Output Type |
|---|---|---|
| Area by class | \(A_{k,t} \cdot A_{px}\) | CSV |
| Percentage | \(\frac{A_{k,t}}{\sum_k A_{k,t}} \times 100\) | CSV |
| Gain | \(\sum_{i \ne k} M_{i,k}\) | CSV |
| Loss | \(\sum_{j \ne k} M_{k,j}\) | CSV |
| Net change | \(\text{Gain}_k - \text{Loss}_k\) | CSV |
| Gross change | \(\text{Gain}_k + \text{Loss}_k\) | CSV |
| Transition count | \(M_{i,j}\) | CSV |
| Interval intensity | \(\frac{\text{Changed}}{\text{Total}}\) | CSV |
| Annual intensity | \(\frac{I_{\text{interval}}}{t_1 - t_0}\) | CSV |
| Change frequency | \(\sum_{t=1}^{T-1} \mathbf{1}[L_t(p) \ne L_{t+1}(p)]\) | Raster |
| Hotspot density | \(\sum_{i=1}^{n} K\left(\frac{d_i}{h}\right)\) | Raster |