From 5ab8ddb4ca3cd848017bc3435ff3784c4bf53c31 Mon Sep 17 00:00:00 2001 From: German Khokhlov Date: Mon, 2 Nov 2026 23:12:38 +0400 Subject: [PATCH] Double the far-zoom heat spots so they read as spots At 10 km per pixel each fire was a marker-sized spot that faded into the imagery from the globe view. A 2048 px grid with the same one-pixel blur makes every spot exactly twice as wide (~60 km for a lone weak fire), still separate, and the build is three times faster. --- changelog.d/1426-fire-intensity-filter.md | 2 +- docs/CURRENT-STATE.md | 6 +++--- src/layers/firms/heatImagery.test.mjs | 4 ++-- src/layers/firms/policy.js | 15 ++++++++------- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/changelog.d/1426-fire-intensity-filter.md b/changelog.d/1426-fire-intensity-filter.md index 4c02ccf20..6f2d11a33 100644 --- a/changelog.d/1426-fire-intensity-filter.md +++ b/changelog.d/1426-fire-intensity-filter.md @@ -4,6 +4,6 @@ log-scale minimum-FRP slider whose track is the ramp, an All / Nominal+ / High confidence switch and an "N of M shown" counter to the layer row. Far zoom shows a Snap Map–style heatmap in the same colors instead of squares, - one marker-sized spot per fire, empty where nothing burns. The filter applies once before rendering, so markers, cards, the heatmap, context and the top-fires query agree; share + one distinct spot per fire, empty where nothing burns. The filter applies once before rendering, so markers, cards, the heatmap, context and the top-fires query agree; share links keep it (`w` token: `f`, `c`), and `get_active_fires` takes matching `min_frp_mw` and `confidence` arguments. Default 0 MW / All (gekh, #1426). diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 5be2a98dc..4d1b69849 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -2185,10 +2185,10 @@ accents read that ramp; confidence and brightness do not affect the color. At far zoom (camera above ~3,000 km) the layer drapes a Snap Map–style heatmap instead of individual markers: the shown detections are binned on a -global 4096 × 2048 grid (≈10 km per pixel), each weighted by its FRP in megawatts (so heat is +global 2048 × 1024 grid (≈20 km per pixel), each weighted by its FRP in megawatts (so heat is radiated power, and raising the FRP slider does not dim areas where strong fires -burn), Gaussian-blurred by one pixel so each fire stays a spot about the size -of its marker, +burn), Gaussian-blurred by one pixel so each fire stays a distinct spot about +twice the size of its marker, normalized on a log scale against the 99.5th percentile and mapped through the same hues, from a bright red edge through orange and gold to a pale white-hot core. The edge starts more than half opaque, so regions far below diff --git a/src/layers/firms/heatImagery.test.mjs b/src/layers/firms/heatImagery.test.mjs index 4b6403298..5543a0691 100644 --- a/src/layers/firms/heatImagery.test.mjs +++ b/src/layers/firms/heatImagery.test.mjs @@ -88,7 +88,7 @@ test('destroy removes the layer', () => { assert.equal(h.layers.length, 0); }); -test('the shipped raster paints a lone weak fire as a marker-sized spot', () => { +test('the shipped raster paints a lone weak fire as a distinct spot', () => { // A hot cluster elsewhere sets the scale, as Africa does on real data. const fires = [{ lat: 0, lon: 0, frp: 5 }]; for (let i = 0; i < 40; i++) { @@ -106,7 +106,7 @@ test('the shipped raster paints a lone weak fire as a marker-sized spot', () => const kmPerPx = 40075 / r.width; assert.ok(painted.length > 0, 'the weak fire still shows'); assert.ok( - painted.length * kmPerPx <= 80, + painted.length * kmPerPx <= 100, `spot ${Math.round(painted.length * kmPerPx)} km wide`, ); }); diff --git a/src/layers/firms/policy.js b/src/layers/firms/policy.js index 9de42cfa4..2af5d9f5c 100644 --- a/src/layers/firms/policy.js +++ b/src/layers/firms/policy.js @@ -49,16 +49,17 @@ export const LOD_LEVELS = [ ]; /** - * Global heat raster for the `heat` bands: ≈0.09° (≈10 km) per pixel and a - * one-pixel Gaussian σ, so a lone fire is a spot about as wide as its marker - * at the 3,000 km hand-off and neighbours merge only when they really touch - * (2048 px with σ 3 smeared each fire over ~200 km). Built once per data - * refresh or filter change, never per camera move. + * Global heat raster for the `heat` bands: ≈0.18° (≈20 km) per pixel and a + * one-pixel Gaussian σ, so a lone fire is a distinct spot about twice as wide + * as its marker at the 3,000 km hand-off and still reads from the + * whole-globe view; neighbours merge only when they nearly touch (σ 3 here + * smeared each fire over ~200 km). Built once per data refresh or filter + * change, never per camera move. */ export const HEAT_RASTER = Object.freeze({ - width: 4096, - height: 2048, + width: 2048, + height: 1024, sigmaPx: 1, });