What the Box-Counting Method Does
It measures how complicated a river network is by checking how many grid boxes are needed to cover it at different scales.
The procedure (as described on the page):
Overlay a grid of square boxes of size 𝜀 on the river map.
Count how many boxes \(𝑁 ( 𝜀 )\) contain any part of the river.
Repeat with smaller and smaller boxes.
Plot:
- Compute the slope of the line. That slope is the fractal dimension \(𝐷\) .
The formula shown on the page:
Box‑Counting Formula In the box‑counting method, the formula shown on your page is:
\[
D = \lim_{\varepsilon \to 0} \frac{\log N(\varepsilon)}{\log(1/\varepsilon)}
\tag{1}\]
As shown in Equation Equation 1, the box-counting dimension…
means:
This is the standard mathematical definition of box-counting domension.
Nonlinear Shallow Water Equations (SWE)
Explained in the context of your river-analysis
It is called nonlinear because the velocity and water depth interact in multiplicative ways, producing complex flow behavior (exactly the kind of complexity that motivates fractal analysis of river networks).
What SWE represent
- Water depth changes over time
- Flow velocity evolves in space
- Momentum is transported downstream
- Gravity, inertia, and bed slope shape the flow
These equations are the backbone of hydrodynamic models used to simulate:
- River discharge
- Channel branching behavior
- Flow accumulation patterns
All of these processes influence the geometry and fractal structure of river networks
What Occupancy: \(\phi(\Delta)\)
The fractal of area that is “active” (covered by the river network) inside a square of size \(\Delta \times \Delta\). So:
\[
\phi(\Delta)=\frac{\text{active area in }\Delta^2}{\text{total area in }\Delta^2}
\tag{6}\]
when:
\(\Delta\) is the obdervation scale (the size of the box you use to measure how much of the river network is inside it).
As you zoom out \(\text{(larger }\Delta)\), the river network occupies a smaller fraction of the box.
As you zoom in \(\text{(smaller }\Delta)\), the river network occupies a larger fraction of the box. This scale-dependence is the hallmark of fractal geometry.
Part I: Workflow Optimization — Identifying the Optimal Pipeline
Goal: Compare all 48 workflow combinations (3 Ground Filters × 4 Interpolations × 2 Sink-Fills × 2 Flow Directions) at each resolution using pairwise Intersection over Union (IoU). The workflow achieving the highest Median IoU is carried forward to the fractal analysis in Part II.
====================================================
IoU Optimisation: 1m
====================================================
Files found: 48
Sample filename → component mapping:
csf_idw_area1_1m_20251024_Hororo_area1_fillpd_d8.tif → CSF_IDW_PLAN_D8
csf_idw_area1_1m_20251024_Hororo_area1_fillpd_dinf.tif → CSF_IDW_PLAN_Dinf
csf_idw_area1_1m_20251024_Hororo_area1_fillwl_d8.tif → CSF_IDW_WANG_D8
csf_idw_area1_1m_20251024_Hororo_area1_fillwl_dinf.tif → CSF_IDW_WANG_Dinf
Loaded: 48 rasters
Computing 1128 pairwise comparisons...
★ BEST [1m]: CSF_KRG_WANG_D8 (Median IoU = 0.9650)
====================================================
IoU Optimisation: 5m
====================================================
Files found: 48
Sample filename → component mapping:
csf_idw_area1_5m_20251024_Hororo_area1_fillpd_d8.tif → CSF_IDW_PLAN_D8
csf_idw_area1_5m_20251024_Hororo_area1_fillpd_dinf.tif → CSF_IDW_PLAN_Dinf
csf_idw_area1_5m_20251024_Hororo_area1_fillwl_d8.tif → CSF_IDW_WANG_D8
csf_idw_area1_5m_20251024_Hororo_area1_fillwl_dinf.tif → CSF_IDW_WANG_Dinf
Loaded: 48 rasters
Computing 1128 pairwise comparisons...
★ BEST [5m]: PMF_TIN_WANG_D8 (Median IoU = 0.9344)
====================================================
IoU Optimisation: 10m
====================================================
Files found: 48
Sample filename → component mapping:
csf_idw_area1_10m_20251024_Hororo_area1_fillpd_d8.tif → CSF_IDW_PLAN_D8
csf_idw_area1_10m_20251024_Hororo_area1_fillpd_dinf.tif → CSF_IDW_PLAN_Dinf
csf_idw_area1_10m_20251024_Hororo_area1_fillwl_d8.tif → CSF_IDW_WANG_D8
csf_idw_area1_10m_20251024_Hororo_area1_fillwl_dinf.tif → CSF_IDW_WANG_Dinf
Loaded: 48 rasters
Computing 1128 pairwise comparisons...
★ BEST [10m]: PMF_TIN_PLAN_D8 (Median IoU = 0.9220)
==========================================================
OPTIMAL WORKFLOWS IDENTIFIED PER RESOLUTION
==========================================================
1m | CSF_KRG_WANG_D8 | Median IoU = 0.9650
5m | PMF_TIN_WANG_D8 | Median IoU = 0.9344
10m | PMF_TIN_PLAN_D8 | Median IoU = 0.9220
==========================================================
1 m Resolution — Optimization Results
Summary Statistics by Component
IoU Statistics by Workflow Component – 1 m Resolution
| Ground Filter |
CSF |
0.9544 |
0.9563 |
0.0154 |
0.9459 |
0.9666 |
632 |
| Ground Filter |
MCC |
0.9534 |
0.9538 |
0.0136 |
0.9451 |
0.9612 |
376 |
| Ground Filter |
PMF |
0.9672 |
0.9662 |
0.0157 |
0.9543 |
0.9739 |
120 |
| Interpolation |
IDW |
0.9599 |
0.9590 |
0.0140 |
0.9487 |
0.9688 |
354 |
| Interpolation |
KRG |
0.9560 |
0.9602 |
0.0158 |
0.9497 |
0.9710 |
306 |
| Interpolation |
MBA |
0.9469 |
0.9472 |
0.0135 |
0.9391 |
0.9546 |
258 |
| Interpolation |
TIN |
0.9567 |
0.9585 |
0.0140 |
0.9491 |
0.9651 |
210 |
| Sink-Fill |
PLAN |
0.9557 |
0.9586 |
0.0150 |
0.9479 |
0.9689 |
588 |
| Sink-Fill |
WANG |
0.9545 |
0.9542 |
0.0152 |
0.9442 |
0.9644 |
540 |
| Flow Direction |
D8 |
0.9574 |
0.9597 |
0.0148 |
0.9500 |
0.9689 |
576 |
| Flow Direction |
Dinf |
0.9517 |
0.9532 |
0.0151 |
0.9433 |
0.9635 |
552 |
Component IoU Distribution
Top 10 Workflows
Top 10 Workflows by Median IoU – 1 m Resolution
| CSF_KRG_WANG_D8 |
0.9650 |
0.9640 |
0.0166 |
0.9299 |
1.0000 |
47 |
| PMF_KRG_WANG_D8 |
0.9650 |
0.9640 |
0.0166 |
0.9299 |
1.0000 |
47 |
| PMF_IDW_WANG_D8 |
0.9645 |
0.9630 |
0.0138 |
0.9361 |
0.9924 |
47 |
| PMF_TIN_WANG_D8 |
0.9644 |
0.9635 |
0.0158 |
0.9172 |
0.9909 |
47 |
| PMF_IDW_PLAN_D8 |
0.9640 |
0.9658 |
0.0118 |
0.9471 |
0.9985 |
47 |
| CSF_TIN_PLAN_D8 |
0.9635 |
0.9638 |
0.0118 |
0.9400 |
0.9973 |
47 |
| CSF_IDW_WANG_D8 |
0.9630 |
0.9600 |
0.0147 |
0.9332 |
0.9930 |
47 |
| PMF_IDW_PLAN_Dinf |
0.9629 |
0.9643 |
0.0119 |
0.9453 |
0.9985 |
47 |
| CSF_TIN_PLAN_Dinf |
0.9619 |
0.9601 |
0.0131 |
0.9369 |
0.9973 |
47 |
| CSF_TIN_WANG_D8 |
0.9617 |
0.9605 |
0.0131 |
0.9304 |
0.9903 |
47 |
Best Option per Component
Consensus – Best Option per Component – 1 m Resolution
| Ground Filter |
PMF |
0.9672 |
1.4% |
| Interpolation |
IDW |
0.9599 |
1.4% |
| Sink-Fill |
PLAN |
0.9557 |
0.1% |
| Flow Direction |
D8 |
0.9574 |
0.6% |
Kruskal-Wallis Significance Tests
Kruskal-Wallis Tests – 1 m (*** p<0.001, ** p<0.01, * p<0.05)
| Ground_Filter |
57.35 |
2 |
0.00000 |
*** |
| Interpolation |
131.47 |
3 |
0.00000 |
*** |
| Sink_Fill |
14.34 |
1 |
0.00015 |
*** |
| Flow_Direction |
50.30 |
1 |
0.00000 |
*** |
5 m Resolution — Optimization Results
Summary Statistics by Component
IoU Statistics by Workflow Component – 5 m Resolution
| Ground Filter |
CSF |
0.9152 |
0.9193 |
0.0270 |
0.8983 |
0.9389 |
632 |
| Ground Filter |
MCC |
0.9046 |
0.9069 |
0.0275 |
0.8889 |
0.9185 |
376 |
| Ground Filter |
PMF |
0.9423 |
0.9331 |
0.0347 |
0.9012 |
0.9588 |
120 |
| Interpolation |
IDW |
0.9208 |
0.9221 |
0.0277 |
0.9039 |
0.9412 |
354 |
| Interpolation |
KRG |
0.9069 |
0.9174 |
0.0331 |
0.8927 |
0.9393 |
306 |
| Interpolation |
MBA |
0.9015 |
0.9069 |
0.0236 |
0.8915 |
0.9118 |
258 |
| Interpolation |
TIN |
0.9159 |
0.9184 |
0.0290 |
0.9023 |
0.9317 |
210 |
| Sink-Fill |
PLAN |
0.9121 |
0.9183 |
0.0309 |
0.8945 |
0.9378 |
588 |
| Sink-Fill |
WANG |
0.9100 |
0.9149 |
0.0271 |
0.8965 |
0.9337 |
540 |
| Flow Direction |
D8 |
0.9118 |
0.9184 |
0.0307 |
0.8962 |
0.9371 |
576 |
| Flow Direction |
Dinf |
0.9103 |
0.9148 |
0.0274 |
0.8947 |
0.9349 |
552 |
Component IoU Distribution
Top 10 Workflows
Top 10 Workflows by Median IoU – 5 m Resolution
| PMF_TIN_WANG_D8 |
0.9344 |
0.9292 |
0.0217 |
0.8878 |
0.9929 |
47 |
| CSF_TIN_PLAN_Dinf |
0.9302 |
0.9266 |
0.0254 |
0.8672 |
0.9970 |
47 |
| CSF_TIN_WANG_Dinf |
0.9284 |
0.9260 |
0.0252 |
0.8765 |
0.9961 |
47 |
| CSF_IDW_PLAN_D8 |
0.9282 |
0.9253 |
0.0239 |
0.8771 |
0.9960 |
47 |
| PMF_TIN_WANG_Dinf |
0.9282 |
0.9260 |
0.0243 |
0.8812 |
0.9929 |
47 |
| PMF_IDW_WANG_D8 |
0.9282 |
0.9276 |
0.0280 |
0.8833 |
0.9980 |
47 |
| CSF_TIN_PLAN_D8 |
0.9265 |
0.9231 |
0.0260 |
0.8652 |
0.9970 |
47 |
| PMF_TIN_PLAN_Dinf |
0.9262 |
0.9262 |
0.0258 |
0.8727 |
0.9898 |
47 |
| PMF_IDW_WANG_Dinf |
0.9259 |
0.9253 |
0.0284 |
0.8736 |
0.9980 |
47 |
| CSF_IDW_WANG_Dinf |
0.9257 |
0.9311 |
0.0225 |
0.8902 |
0.9970 |
47 |
Best Option per Component
Consensus – Best Option per Component – 5 m Resolution
| Ground Filter |
PMF |
0.9423 |
4.2% |
| Interpolation |
IDW |
0.9208 |
2.1% |
| Sink-Fill |
PLAN |
0.9121 |
0.2% |
| Flow Direction |
D8 |
0.9118 |
0.2% |
Kruskal-Wallis Significance Tests
Kruskal-Wallis Tests – 5 m (*** p<0.001, ** p<0.01, * p<0.05)
| Ground_Filter |
86.81 |
2 |
0.00000 |
*** |
| Interpolation |
63.90 |
3 |
0.00000 |
*** |
| Sink_Fill |
1.77 |
1 |
0.18305 |
ns |
| Flow_Direction |
1.66 |
1 |
0.19714 |
ns |
10 m Resolution — Optimization Results
Summary Statistics by Component
IoU Statistics by Workflow Component – 10 m Resolution
| Ground Filter |
CSF |
0.9012 |
0.9063 |
0.0308 |
0.8840 |
0.9241 |
632 |
| Ground Filter |
MCC |
0.9014 |
0.9063 |
0.0316 |
0.8860 |
0.9213 |
376 |
| Ground Filter |
PMF |
0.9255 |
0.9274 |
0.0344 |
0.8998 |
0.9415 |
120 |
| Interpolation |
IDW |
0.9100 |
0.9105 |
0.0291 |
0.8869 |
0.9286 |
354 |
| Interpolation |
KRG |
0.9064 |
0.9095 |
0.0362 |
0.8858 |
0.9247 |
306 |
| Interpolation |
MBA |
0.9033 |
0.9095 |
0.0268 |
0.8930 |
0.9213 |
258 |
| Interpolation |
TIN |
0.8953 |
0.9028 |
0.0358 |
0.8786 |
0.9212 |
210 |
| Sink-Fill |
PLAN |
0.9063 |
0.9113 |
0.0357 |
0.8861 |
0.9271 |
588 |
| Sink-Fill |
WANG |
0.9012 |
0.9055 |
0.0273 |
0.8859 |
0.9235 |
540 |
| Flow Direction |
D8 |
0.9065 |
0.9105 |
0.0335 |
0.8866 |
0.9268 |
576 |
| Flow Direction |
Dinf |
0.9012 |
0.9065 |
0.0304 |
0.8859 |
0.9232 |
552 |
Component IoU Distribution
Top 10 Workflows
Top 10 Workflows by Median IoU – 10 m Resolution
| PMF_TIN_PLAN_D8 |
0.9220 |
0.9163 |
0.0338 |
0.8355 |
1.0000 |
47 |
| PMF_TIN_WANG_D8 |
0.9214 |
0.9178 |
0.0318 |
0.8411 |
1.0000 |
47 |
| CSF_KRG_WANG_D8 |
0.9213 |
0.9221 |
0.0340 |
0.8657 |
1.0000 |
47 |
| PMF_KRG_WANG_D8 |
0.9213 |
0.9221 |
0.0340 |
0.8657 |
1.0000 |
47 |
| PMF_TIN_PLAN_Dinf |
0.9213 |
0.9136 |
0.0330 |
0.8446 |
0.9975 |
47 |
| PMF_TIN_WANG_Dinf |
0.9198 |
0.9136 |
0.0321 |
0.8435 |
0.9975 |
47 |
| CSF_KRG_PLAN_D8 |
0.9196 |
0.9207 |
0.0370 |
0.8591 |
1.0000 |
47 |
| PMF_KRG_PLAN_D8 |
0.9196 |
0.9207 |
0.0370 |
0.8591 |
1.0000 |
47 |
| PMF_IDW_WANG_Dinf |
0.9154 |
0.9166 |
0.0268 |
0.8774 |
0.9901 |
47 |
| CSF_KRG_PLAN_Dinf |
0.9141 |
0.9159 |
0.0392 |
0.8545 |
1.0000 |
47 |
Best Option per Component
Consensus – Best Option per Component – 10 m Resolution
| Ground Filter |
PMF |
0.9255 |
2.7% |
| Interpolation |
IDW |
0.9100 |
1.6% |
| Sink-Fill |
PLAN |
0.9063 |
0.6% |
| Flow Direction |
D8 |
0.9065 |
0.6% |
Kruskal-Wallis Significance Tests
Kruskal-Wallis Tests – 10 m (*** p<0.001, ** p<0.01, * p<0.05)
| Ground_Filter |
42.36 |
2 |
0.00000 |
*** |
| Interpolation |
16.96 |
3 |
0.00072 |
*** |
| Sink_Fill |
3.89 |
1 |
0.04856 |
* |
| Flow_Direction |
2.82 |
1 |
0.09303 |
ns |
Cross-Resolution Optimization Summary
==============================================================
CROSS-RESOLUTION OPTIMAL WORKFLOW SUMMARY
==============================================================
Resolution Best_Workflow Median_IoU Mean_IoU SD_IoU N_Rasters N_Pairs
<char> <char> <num> <num> <num> <int> <int>
1m CSF_KRG_WANG_D8 0.9650456 0.9639831 0.01663718 48 1128
5m PMF_TIN_WANG_D8 0.9344262 0.9292265 0.02170846 48 1128
10m PMF_TIN_PLAN_D8 0.9219858 0.9162808 0.03379022 48 1128
==============================================================
Optimal Workflow per Resolution – used in Part II fractal analysis
| 1m |
CSF_KRG_WANG_D8 |
0.9650 |
0.9640 |
0.0166 |
48 |
1128 |
| 5m |
PMF_TIN_WANG_D8 |
0.9344 |
0.9292 |
0.0217 |
48 |
1128 |
| 10m |
PMF_TIN_PLAN_D8 |
0.9220 |
0.9163 |
0.0338 |
48 |
1128 |
Discussion
Methodological Advantages
Limitations and Considerations