mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
fix(alpr): require explicit SharpV G3 before showing G3 specs
Address gekh's P2 review of ch-bas's ALPR datasheet feature. Keep the vendored records verbatim, reject generation-ambiguous SharpV model tags, and cover G1/G2/G3 matching and the rendered card with node:test. Update the documented matched-camera count and changelog, preserving original author ch-bas and existing attribution.
This commit is contained in:
1 parent
71d853dff0
commit
5371f3ee70
4 files changed
+43
-9
No files matched your search
@@ -7,8 +7,9 @@
|
||||
* vendors the records for the models among them that the CCTV Camera Database
|
||||
* (https://github.com/ch-bas/cctv-camera-database, CC0-1.0) covers —
|
||||
* Motorola Solutions Vigilant, Genetec AutoVu, Axis, Verkada and Bosch MIC,
|
||||
* which resolve 459 of those cameras — and resolves a camera's `model` (with
|
||||
* its `manufacturer`) through the CCTV layer's matcher. The hourly extract the
|
||||
* which resolve 408 of those cameras (excluding unversioned SharpV tags) —
|
||||
* and resolves a camera's `model` (with its `manufacturer`) through the CCTV
|
||||
* layer's matcher. The hourly extract the
|
||||
* layer reads by default does not publish `model` yet, so today only an
|
||||
* Overpass-backed source shows these specs. Flock Safety publishes no
|
||||
* datasheet resolution, so Flock models stay unresolved; an unknown model
|
||||
@@ -254,4 +255,16 @@ const RECORDS = [
|
||||
* @param {string|null} [manufacturer] - The OSM `manufacturer` tag.
|
||||
* @returns {Object|null} The verbatim spec record, or null when unknown.
|
||||
*/
|
||||
export const lookupAlprModelSpec = createModelSpecLookup(RECORDS);
|
||||
const lookupDatasheetSpec = createModelSpecLookup(RECORDS);
|
||||
|
||||
export function lookupAlprModelSpec(model, manufacturer) {
|
||||
const spec = lookupDatasheetSpec(model, manufacturer);
|
||||
// The dataset's unversioned SharpV label is tied to G3 hardware, but OSM
|
||||
// tags may name G1 or G2. Require an explicit G3 or a G3 part number.
|
||||
if (
|
||||
spec?.id === 'genetec-autovu-sharpv' &&
|
||||
!/\bg3\b/i.test(String(model || ''))
|
||||
)
|
||||
return null;
|
||||
return spec;
|
||||
}
|
||||
Reference in new issue
Block a user