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.
This commit is contained in:
German Khokhlov committed 2026-11-02 23:12:38 +04:00
1 parent ad171f2854
commit 5ab8ddb4ca
4 files changed
+14 -13

No files matched your search

+1 -1
View File
@@ -4,6 +4,6 @@
log-scale minimum-FRP slider whose track is the ramp, an All / Nominal+ / 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 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, 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 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). `min_frp_mw` and `confidence` arguments. Default 0 MW / All (gekh, #1426).
+3 -3
View File
@@ -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 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 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 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 burn), Gaussian-blurred by one pixel so each fire stays a distinct spot about
of its marker, twice the size of its marker,
normalized on a log scale against the 99.5th percentile and mapped through the 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 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 white-hot core. The edge starts more than half opaque, so regions far below
+2 -2
View File
@@ -88,7 +88,7 @@ test('destroy removes the layer', () => {
assert.equal(h.layers.length, 0); 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. // A hot cluster elsewhere sets the scale, as Africa does on real data.
const fires = [{ lat: 0, lon: 0, frp: 5 }]; const fires = [{ lat: 0, lon: 0, frp: 5 }];
for (let i = 0; i < 40; i++) { 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; const kmPerPx = 40075 / r.width;
assert.ok(painted.length > 0, 'the weak fire still shows'); assert.ok(painted.length > 0, 'the weak fire still shows');
assert.ok( assert.ok(
painted.length * kmPerPx <= 80, painted.length * kmPerPx <= 100,
`spot ${Math.round(painted.length * kmPerPx)} km wide`, `spot ${Math.round(painted.length * kmPerPx)} km wide`,
); );
}); });
+8 -7
View File
@@ -49,16 +49,17 @@ export const LOD_LEVELS = [
]; ];
/** /**
* Global heat raster for the `heat` bands: ≈0.09° (≈10 km) per pixel and a * Global heat raster for the `heat` bands: ≈0.18° (≈20 km) per pixel and a
* one-pixel Gaussian σ, so a lone fire is a spot about as wide as its marker * one-pixel Gaussian σ, so a lone fire is a distinct spot about twice as wide
* at the 3,000 km hand-off and neighbours merge only when they really touch * as its marker at the 3,000 km hand-off and still reads from the
* (2048 px with σ 3 smeared each fire over ~200 km). Built once per data * whole-globe view; neighbours merge only when they nearly touch (σ 3 here
* refresh or filter change, never per camera move. * smeared each fire over ~200 km). Built once per data refresh or filter
* change, never per camera move.
*/ */
export const HEAT_RASTER = Object.freeze({ export const HEAT_RASTER = Object.freeze({
width: 4096, width: 2048,
height: 2048, height: 1024,
sigmaPx: 1, sigmaPx: 1,
}); });