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

+2 -2
View File
@@ -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`,
);
});
+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
* 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,
});