mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 18:22:25 +00:00
feat(alpr): show datasheet specs for mapped ALPR camera models
Read the OSM `model` tag on ALPR records and resolve it, with the `manufacturer` tag, against 16 vendored CCTV Camera Database records (v2.29.0): Motorola Solutions Vigilant, Genetec AutoVu, Axis, Verkada and Bosch MIC. A resolved camera's card gains a SPEC line; an unknown or mis-attributed model shows nothing, and the raw tag text never reaches the card or the voice tools. The CCTV matcher becomes createModelSpecLookup(records) so both layers share one set of matching rules, and specSummary falls back to pixel size or megapixels when a record has no resolution label. 459 of the 1,567 OSM ALPR nodes with a model tag resolve. The hourly extract the layer reads by default has no model field yet, so tile records carry it only once the extract publishes it.
This commit is contained in:
1 parent
9d3548c27c
commit
52ebd8ac94
10 files changed
+452
-53
No files matched your search
@@ -1,5 +1,7 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import { destinationPointDeg } from './model.js';
|
||||
import { lookupAlprModelSpec } from './modelSpecs.js';
|
||||
import { specSummary } from '../cctv/modelSpecs.js';
|
||||
import {
|
||||
DIRECTION_CONE_M,
|
||||
DIRECTION_CONE_HALF_ANGLE_DEG,
|
||||
@@ -42,7 +44,10 @@ export function alprDisplayId(record) {
|
||||
return `ALPR-${String(record.osmId).slice(-4).padStart(4, '0')}`;
|
||||
}
|
||||
|
||||
/** Show only supplied metadata, with the actual source named for custom adapters. */
|
||||
/**
|
||||
* Show only supplied metadata, with the actual source named for custom
|
||||
* adapters, plus the datasheet summary when the mapped model is known.
|
||||
*/
|
||||
export function alprLabelDetails(record, source) {
|
||||
const sourceName =
|
||||
source.attribution?.name || source.label || 'Camera source';
|
||||
@@ -63,6 +68,9 @@ export function alprLabelDetails(record, source) {
|
||||
),
|
||||
];
|
||||
if (equipment.length) details.push(equipment.join(' · '));
|
||||
// Only a datasheet match is shown: the raw OSM `model` text never is.
|
||||
const spec = lookupAlprModelSpec(record.model, record.manufacturer);
|
||||
if (spec) details.push(`SPEC ${specSummary(spec).toUpperCase()}`);
|
||||
if (sourceName === 'OpenStreetMap') details.push('PUBLIC MAP DATA');
|
||||
return details;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user