mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
feat(firms): export the layer's FRP and Confidence filter (#1822)
The fire layer module exports filterFires and DEFAULT_FIRE_FILTER, the filter its markers use, so an application drawing the same detections another way hides the same fires.
This commit is contained in:
1 parent
d6972f8b78
commit
edc64bdf9a
3 files changed
+20
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { DEFAULT_FIRE_FILTER, filterFires } from './index.js';
|
||||
|
||||
test('the fire layer exports the filter its markers use', () => {
|
||||
const fires = [
|
||||
{ frp: 2, confidence: 0.3 },
|
||||
{ frp: 40, confidence: 0.9 },
|
||||
];
|
||||
assert.equal(filterFires(fires, DEFAULT_FIRE_FILTER), fires);
|
||||
assert.deepEqual(filterFires(fires, { minFrp: 10, confidence: 'all' }), [
|
||||
fires[1],
|
||||
]);
|
||||
});
|
||||
@@ -40,3 +40,6 @@ export { createFirmsSource } from './source.js';
|
||||
export { createFireAnchors, FIRE_ANCHOR_LIFT_M } from './anchors.js';
|
||||
export * from '../../data/firmsAdapt.js';
|
||||
export * from '../../data/firmsLabels.js';
|
||||
// The layer's own FRP and Confidence filter, for an application drawing the same detections
|
||||
// another way: what it draws then matches the layer's markers under the same filter.
|
||||
export { DEFAULT_FIRE_FILTER, filterFires } from '../../data/firmsIntensity.js';
|
||||
Reference in new issue
Block a user