mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
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:
1 parent
ad171f2854
commit
5ab8ddb4ca
4 files changed
+14
-13
No files matched your search
@@ -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).
|
||||
@@ -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
|
||||
|
||||
@@ -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`,
|
||||
);
|
||||
});
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user