Skip to content

Phase 4: per-cell statistics on any grid (cell_stats, LaeaGrid) - #36

Merged
gzileni merged 1 commit into
mainfrom
feat/cells
Nov 25, 2026
Merged

gzileni merged 1 commit into
mainfrom
feat/cells

Conversation

@gzileni

@gzileni gzileni commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Part of #26, phase 4.

  • firms_client.cells.cell_stats(hotspots, grid, cells=, mask=, land=) → {cell: CellStats}: fire-days (type 0, distinct days), fire-days per km², WorldCover cropland and natural share under the fire-days, static_km to the nearest static source, trust score at the centre. None is not measured, never 0: a cell on a static source of the mask is not measured; no land cover or no fire-day → cropland None.
  • Grids: LaeaGrid (ETRS89-LAEA / EPSG:3035 computed here, checked on the IOGP 7-2 worked example; default origin = the EEA 1 km reference grid, code() → 1kmE4869N2012; with an AOI's bounds as origin it is Limen's grid), DegreeGrid, any Grid.
  • firms cells Italy 2024 [2025] [--bbox] [--mask] [--land] [--format csv|json].
  • Speed: the nearest static source per cell uses per-square candidate lists: 1.56 M cells in 31 s (Italy's 312k ≈ 6 s); a test checks it against brute force.

Benchmark (ten new cells checks, truth = EFFIS CORINE shares): cropland under the fire-days 0.59 / 0.71 / 0.58 / 0.86 on the agricultural fires, 0–0.004 on the five wildfires; Polizzi (no detection) stays not measured and fails. classify_burning called three of those four mixed: the continuous share keeps what the yes/no label throws away. 34 of 41 pass.

Limen side (parity with fire_density, crop_burning_share via limen misura) after the release.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VFEUmXwmaxtB7PF8sSP1d4

…ase 4)

cell_stats(hotspots, grid, cells=, mask=, land=): fire-days (type 0,
distinct days), fire-days per km², WorldCover cropland and natural share
under the fire-days, distance from the nearest static source, trust at the
centre. None is not measured, never 0: a cell on a static source of the
mask is not measured.

LaeaGrid (ETRS89-LAEA, EPSG:3035, IOGP 7-2 formulas, no pyproj; default
origin = EEA reference grid, code()), DegreeGrid, the Grid protocol.
firms cells COUNTRY FIRST [LAST] [--mask] [--land].

Benchmark: ten cells checks on the EFFIS perimeters. Cropland under the
fire-days is 0.58-0.86 on the four agricultural fires FIRMS saw and
0-0.004 on the five wildfires; Polizzi stays not measured. 34 of 41.

Part of #26.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VFEUmXwmaxtB7PF8sSP1d4
@gzileni gzileni changed the title Phase 4: per-cell statistics on any grid Phase 4: per-cell statistics on any grid (cell_stats, LaeaGrid) Nov 25, 2026
@gzileni
gzileni merged commit 50a95c6 into main Nov 25, 2026
6 checks passed
@gzileni
gzileni deleted the feat/cells branch November 25, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant