Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

02b — 30 m domain masks, sampling and predictor extraction (Colombia)

LifeWatch ERIC

Works on the native 30 m Hansen lattice (0.00025°, identical to the authors’ map), in 1° × 1° tiles with a 0.25° margin, in parallel. For every tile that intersects Colombia ∩ study biomes:

  1. Forest = Hansen tree cover 2000 ≥ TREE_THRESHOLD (%). Forest 2018 = forest 2000 AND NOT loss 2001–2018 (the usual GFW convention; gain is not added, as GFW advises against combining gain and loss).

  2. Focal predictors (2000 for training, 2018 for prediction): forest density = forest fraction in a 1 km-radius disk; distance to forest (m, Euclidean on the ellipsoid-scaled grid, truncated at 25 km).

  3. Masks (pixel-centre rule):

    • study domain = Colombia (GADM 4.1) ∩ RESOLVE biomes 1, 2, 3;

    • class 1 = study domain ∩ Fagan regrowth polygons;

    • class 0 = study domain − forest 2000 − ESA CCI 2000 classes 150–153, 190, 200–202, 210 − all Fagan polygons (regrowth, plantation, open);

    • prediction domain = study domain − forest 2018 − ESA CCI 2015 classes 190, 200–202, 210 (open water, urban, bare as in the paper).

  4. Sampling. Class 0 and class 1 candidates by Bernoulli sampling with inclusion probability ∝ exact pixel area (ellipsoid-aware). A systematic 1-in-100 grid (every 10th row and column of the global lattice) gives the prediction sample.

  5. Coarse predictors sampled at the pixel centre (nearest neighbour) from data/clean/; slope (Horn) from SRTMGL1 computed per tile.

  6. Exact sums over all 30 m pixels of each tile: domain areas, and the authors’ map restricted to the study domain.

Smoke mode (SMOKE=1): only the 1° tiles inside the smoke sub-window (-75…-73°E, 4…6°N), 3,000 points per class; outputs in data/clean_smoke/.

Colombia share 0.0395; target 214,809 points per class (pool + validation)

Vector inputs and tile list

study biomes present: ['Tropical & Subtropical Moist Broadleaf Forests', 'Tropical & Subtropical Dry Broadleaf Forests']
regrowth area in domain 253,341 ha; domain 93.24 Mha; rates class1 0.0973, class0 0.00070
121 tiles of 1°

Coarse layers (loaded once; shared with forked workers)

coarse layers: ['pc1', 'pc2', 'pc3', 'pc4', 'pc5', 'cpc1', 'cpc2', 'cpc3', 'cpc4', 'cpc5', 'ocdens', 'phihox', 'lc_1992', 'lc_1999', 'lc_2000', 'lc_2015', 'esa_2000', 'esa_2015', 'cropland_density_2000', 'cropland_density_2015', 'dist_urban_2000', 'dist_urban_2015', 'npp', 'road_density', 'burned_frac']

Authors’ map tiles (for comparison at the same pixels)

Per-tile worker

Run all tiles (parallel, fork)

1/121 tiles
11/121 tiles
21/121 tiles
31/121 tiles
41/121 tiles
51/121 tiles
61/121 tiles
71/121 tiles
81/121 tiles
91/121 tiles
101/121 tiles
111/121 tiles
121/121 tiles
458270 pool candidates; 12161726 grid points

Balanced draw: training pool and independent validation set

From the candidates, draw TARGET_PER_CLASS points per class (or as many as exist), drop points with any missing final-model predictor, then split each class into a training pool (6/10.87 of the points, as 6 M vs 4.87 M in the paper) and an independent validation set. The two sets never share a pixel.

set         label
train_pool  0        75990
            1        75990
validation  0        61678
            1        61678
dtype: int64
Exact areas (Mha, ellipsoid / Mollweide-sphere):
  country    107.020   107.730
  domain      93.241    93.861
  class1       0.252     0.253
  class0      15.055    15.154
  pred        18.885    19.009
Authors' map within the study domain (Mha):
  expected  ell=10.507  sph=10.576  nom=12.365
  bin1      ell=11.051  sph=11.124  nom=13.006
  binvalid  ell=93.241  sph=93.861  nom=109.453
  pctvalid  ell=18.781  sph=18.905  nom=22.104