fix: say when the camera catalog serves only part of a region

Camera packs keep their nearest cameras and the catalog cap thins them
further, so London answered 250 cameras while TfL offers many more. The
catalog now records each pack's full count, tags cameras with their pack,
and serves the packs it trimmed; find_cctv_cameras names them.
This commit is contained in:
Sameh Khamis committed 2026-10-02 15:21:36 -07:00
1 parent e779432925
commit 66b07418bd
6 files changed
+117 -11

No files matched your search

+4 -1
View File
@@ -470,7 +470,10 @@ export function prioritizeSources(cameras, maxCount, anchors) {
return a.idx - b.idx;
});
return scored.slice(0, cap).map((entry) => entry.camera);
const kept = scored.slice(0, cap).map((entry) => entry.camera);
// How many cameras the pack offered before trimming, for coverage reports.
Object.defineProperty(kept, 'available', { value: list.length });
return kept;
}
/**