Commit Graph
31 Commits
Author SHA1 Message Date
Sameh Khamis 7366a46eba Merge branch 'main' into feat/wsdot-camera-pack 2026-10-15 16:17:22 -07:00
Sameh Khamis 52d26b0577 Merge branch 'main' into feat/wsdot-camera-pack 2026-10-15 16:05:47 -07:00
Sameh Khamis a800d28ddf Merge branch 'main' into feature/catalonia-cctv-cameras 2026-10-15 16:05:20 -07:00
Sameh Khamis a75550024d Merge branch 'main' into feat/king-county-camera-pack 2026-10-15 15:57:27 -07:00
Sameh Khamis 3f239f1173 fix(cctv): give Catalonia cameras stable ids and pin their frame paths
Ids were built from the feed's fid, which embeds an upstream server-start stamp,
so every upstream restart renamed all cameras (it already had since the PR
fixture). Ids now come from the validated frame URL (cat-sct-<stem>, or host
and path for partner cameras), which also collapses the five duplicate rows.
Frame links must sit directly in each host's frame directory with no explicit
port, and sctidcam must be a bare image filename. Numeric entity decoding
handles hex references and leaves invalid code points as written, so one bad
name no longer empties the pack. Counts in the docs are now ~130.
2026-10-15 15:21:34 -07:00
Sameh Khamis 76bfd74a78 fix(cctv): harden the WSDOT catalog fetch and describe its real direction codes
The catalog fetch now refuses redirects, cancels rejected bodies and reads
through the shared capped reader before the windows-1252 decode. The feed sends
cardinal codes plus B (both), O and null, not BW or diagonals; tests, comments
and docs now say so, with unchanged id-hash fallbacks. Documents the 8-1,200
per-pack range, drops the unverified low-volume compliance claim for facts and
a link to WSDOT's terms, and stops claiming the per-pack defaults fit under
the 4,000 cap: it is filled round-robin.
2026-10-15 15:17:59 -07:00
Sameh Khamis 4887162d76 fix(cctv): harden the King County catalog fetch and dedupe before the cap
The catalog fetch now refuses redirects, cancels rejected bodies and reads
through the shared capped JSON reader. Duplicate ids are dropped before
prioritization so they cannot use up the per-pack cap. Vendor-generic model
strings (PTZ, PTZ IP, BOSCH/PTZ) are treated as no model. Comments and credits
say why WSDOT rows are skipped (their frames are WSDOT-hosted, outside the
pinned origin) and name Newcastle as the partner city that appears.
2026-10-15 15:17:11 -07:00
Sameh Khamis 7561a5ab82 Merge branch 'main' into feat/cctv-toronto 2026-10-15 14:23:19 -07:00
Sameh Khamis 24f14a77a3 Merge branch 'main' into feat/wsdot-camera-pack
Keeps main's 4,000 catalog-wide camera cap, which main pins in tests; WSDOT
shares it round-robin with the other packs. The branch's earlier cap raise and
its removal of main's cap tests are reverted in this merge.
2026-10-15 14:22:22 -07:00
Sameh Khamis dca24996d5 Merge branch 'main' into feat/king-county-camera-pack 2026-10-15 14:21:10 -07:00
ulihhhhandClaude Opus 5.5 da0a840b7b Merge upstream/main into feature/catalonia-cctv-cameras
Keep both: Catalonia CCTV alongside the NYC DOT TMC pack in the source
imports, README layer table and CURRENT-STATE data table, and both
CHANGELOG entries.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 10:09:28 +02:00
Cliff Flood 51b89d3e4a feat(cctv): add the City of Toronto RESCU camera pack
The province's 511 pack covers Ontario's highways; this adds the municipal
network underneath it — roughly 336 cameras across downtown arterials plus
the Gardiner, DVP, Allen and Lake Shore, from the City's own open data.

The list is keyless and carries no frame URL, so frame URLs are built from
the convention the dataset documents (`CameraImages/loc####.jpg`) and a
camera number validated as plain digits. The frame proxy is therefore
pinned to the portal origin by construction rather than by trusting a
field. The list fetch refuses redirects, bounds the body it buffers, and
releases the transport on every rejection path.

The dataset publishes no camera facing. `D1`-`D4` look like a compass and
map trivially onto one, but they describe the *comparison* images — static
reference stills captured in 2016 and served from a different path — not
the live pan-tilt-zoom frame. A heading derived from them would be
confidently wrong for every camera in the city, so every camera takes the
shared id-hash fallback at low confidence, as headingless Austin, TfL,
Fintraffic and Calgary cameras do. A test pins that down so it is not
"fixed" later.

Names stay verbatim: the feed's labels are upper-case, and title-casing
would mangle MCCOWAN RD and ST HELEN'S AVE more often than it helped.

Carries the Open Government Licence – Toronto attribution the licence
requires. Disable with `CCTV_TORONTO_ENABLED=0`.
2026-10-13 18:54:59 -04:00
Matt Van Horn 3cf9a8d65d feat(cctv): add NYC DOT Traffic Management Center camera pack
Register the keyless webcams.nyctmc.org catalog as a live CCTV source,
synthesize frame URLs from validated camera UUIDs, and keep the nearest
cameras to the five borough cores under the existing catalog ceiling.
2026-10-12 19:18:45 +00:00
ulihhhhandClaude Opus 5.5 492ecb4849 docs(cctv): state that offline Catalonia cameras show the publisher's still
The Catalonia feed has no camera status field, so an offline camera keeps
its catalog entry and SCT or Barcelona answer its frame with their own
"image unavailable" still (HTTP 200). Say so in DATA_SOURCES.md and stop
the loader comment from implying every camera returns a live frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 13:07:54 +02:00
bassem chagra b7d25f4c69 Merge origin/main into feat/wsdot-camera-pack
Resolve the source-pack conflicts with Statens vegvesen (keep both packs).
The Norway pack's 900 default pushed the per-pack defaults to 5,204, past
the 4,500 catalog cap this PR enforces, so raise DEFAULT_CCTV_MAX_SOURCES
to 5,500 and CCTV_MAX_SOURCES_CEILING to 6,000.
2026-10-08 15:59:09 +02:00
bassem chagra 054f1cc198 Merge remote-tracking branch 'origin/main' into feat/king-county-camera-pack
# Conflicts:
#	.env.example
#	CHANGELOG.md
#	DATA_SOURCES.md
#	README.md
#	docs/CURRENT-STATE.md
#	server/providers/cctv/catalog.js
#	server/providers/cctv/sources.js
#	src/data/dataCredits.js
2026-10-08 15:52:38 +02:00
ulihhhh 9ba7cee021 Merge remote-tracking branch 'upstream/main' into feature/catalonia-cctv-cameras
# Conflicts:
#	.env.example
#	DATA_SOURCES.md
#	docs/CURRENT-STATE.md
#	scripts/format-scope.json
#	server/providers/cctv/constants.js
#	server/providers/cctv/sources.js
#	src/data/dataCredits.js
2026-10-06 20:25:00 +01:00
H4ldenandClaude Opus 5.5 10d10eab6b fix: address review on the Statens vegvesen CCTV pack
- Lower the Vegvesen default cap to 900, still above the ~850 working
  cameras, so the per-pack defaults stay closer to the catalog default.
- Name the flat ground-elevation prior as a known limitation: the feed
  is 2D, and mountain-pass cameras can sit below terrain where neither
  the point-height prior nor the ground snap resolves.
- README: ~3,900 public cameras.
- Use one HLS figure (~135 working) in CHANGELOG and DATA_SOURCES.
- DATA_SOURCES: list the frame and HLS hosts alongside the catalog host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 05:47:50 +02:00
H4ldenandClaude Opus 5.5 d43478a547 feat: add Statens vegvesen (Norway) road cameras as a CCTV pack
Norway's ~850 working road cameras load from one keyless GeoJSON request
to the agency's OGC API view of its DATEX 3.1 CCTV table, so no DATEX
account is needed. Faulty cameras are dropped, every camera sits under a
"Norway" category, and the ~135 that publish HLS play as live video
through the existing in-memory relay with the still as fallback. Frames
and manifests are pinned to each camera's own path on the agency hosts.

CCTV_VEGVESEN_ENABLED=0 disables the pack, CCTV_VEGVESEN_MAX_SOURCES
caps it (nearest the largest cities first) and CCTV_VEGVESEN_VIDEO=0
keeps stills only. Attributed under NLOD 2.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 22:23:16 +02:00
bassem chagra c3f197823e fix(cctv): serve King County model/manufacturer through /api/cctv/sources
The loader and normalizer carried the hardware model, but the /sources
response projection and the browser catalog both whitelist fields and
dropped it, so no client consumer ever saw it. Project model and
manufacturer (manufacturer disambiguates bare model strings like "3950")
at both boundaries, and add a test that drives the real middleware and
browser catalog end to end.
2026-09-27 12:09:27 +00:00
bassem chagra 481d0c327a fix(cctv): map WSDOT diagonal and BW compass codes; document WSDOT env
WSDOT's layer metadata defines BW (Bothways) plus the diagonals
NE/SE/SW/NW alongside N/E/S/W. Diagonal cameras were being demoted to the
low-confidence id-hash fallback; map them to 45/135/225/315 degrees and
treat BW (not B) as the no-single-facing code. Add CCTV_WSDOT_ENABLED and
CCTV_WSDOT_MAX_SOURCES to .env.example with the other pack controls.
2026-09-27 12:09:27 +00:00
ulihhhhandClaude Opus 5.5 320a1d6bfd fix(cctv): harden the Catalonia catalog fetch and frame-link allowlist
Address review feedback on #595:

- Reject frame links carrying userinfo (user:pass@) in
  normalizeCataloniaImageUrl, so catalog data cannot inject credentials
  into the server-side frame request on an allowlisted host.
- Fetch cameres.xml over https (verified: same 200 body, no redirect),
  refuse redirects with the unread body released, and read the body
  through readResponseTextCapped with a 1 MiB CATALONIA_MAX_CATALOG_BYTES
  cap instead of an unbounded resp.text().
- Add regression tests for userinfo links on every allowed host, the
  refused redirect, and declared and streamed oversize bodies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-27 12:01:17 +02:00
bassem chagra 5b00dd0980 feat(cctv): King County road camera source pack (Washington State)
Adds King County DOT Road Services' cameras as a keyless source pack, from
the county's public ArcGIS FeatureServer layer ("King County and WSDOT
Traffic Cameras"). 59 live cameras against the current feed.

- The `outFields` list is explicit on purpose: the layer also carries
  asset-administration columns (including staff names) that must never be
  fetched.
- Only live, active cameras with frames on the county's own
  info.kingcounty.gov image handler are registered; the feed writes http://
  and the handler serves HTTPS, so URLs are upgraded and pinned before
  registration. WSDOT-owned rows are skipped so a camera never appears twice
  when a statewide WSDOT pack is present; the few city-owned cameras the
  county hosts (Redmond, Sammamish, Newcastle, Snoqualmie) carry their owner
  as the per-camera credit, DriveBC-style.
- The layer publishes no facing: headings use the shared id-hash fallback at
  low confidence, correctable with the calibration gizmo.
- Uniquely among the packs, the county publishes each camera's hardware
  Manufacturer/Model (Cohu 3950/3965, Bosch AUTODOME IP 5000i, Axis
  Q6135-LE, Siqura PD910). The model string is whitespace-collapsed (the
  feed carries stray newlines) and carried on the source as `model`, with an
  additive passthrough in normalizeSourceItem (same pattern as poseSource)
  so identified-hardware consumers can use it. All 59 live cameras carry a
  model value.
- Attribution per the KCGIS Center terms, registered in the attribution
  popover and documented in DATA_SOURCES.md.
- Defaults: the whole catalog loads (125 cap); CCTV_KINGCOUNTY_MAX_SOURCES
  changes the cap, CCTV_KINGCOUNTY_ENABLED=0 turns the pack off.
- Tests: filtering (owner/live/status/host/geometry/bbox), HTTPS upgrade,
  model whitespace-collapse and passthrough, partner-city credit, env cap,
  upstream-failure fallback, and normalizeSourceItem model semantics.
2026-09-25 12:35:06 +02:00
bassem chagra ee3e3c7a41 feat(cctv): WSDOT highway camera source pack (Washington State)
Adds Washington State's highway cameras as a keyless source pack, from the
Esri JSON layer WSDOT's own Travel Center map consumes
(data.wsdot.wa.gov/travelcenter/Cameras.json, ~1,700 point features).
Closes #624.

- Geometry arrives in EPSG:3857; converted to WGS84 on load and bounded to
  a Washington bounding box.
- Only frames on WSDOT's own images.wsdot.wa.gov host are registered — the
  catalog also lists ~70 partner cameras (Oregon DOT, City of Seattle,
  lodges, airports) whose own terms apply; those are skipped rather than
  proxied. 1,630 cameras survive the filters against the live feed.
- CompassDirection letters (N/E/S/W) give a high-confidence heading; the
  majority `B` ("both directions") rows carry no single facing and use the
  shared id-hash fallback at low confidence, with the usual two pose
  personalities.
- The feed body carries Windows-1252 bytes (en-dashes in titles) with no
  charset declaration, so it is decoded explicitly before parsing.
- WSDOT's layer metadata marks the feed "low volume": the 15-minute catalog
  cache and per-request frame fetches respect that, frames are never stored
  or redistributed, and the WSDOT credit is registered in the attribution
  popover. A keyed WSDOT Traveler Information API serves the same population
  for higher-volume use and is deliberately not required.
- Defaults: 250 cameras nearest Seattle and Spokane; CCTV_WSDOT_MAX_SOURCES
  changes the cap, CCTV_WSDOT_ENABLED=0 turns the pack off.
- Tests: Mercator conversion against a real layer feature, official-host and
  malformed-row filtering, compass mapping and both pose personalities,
  cp1252 decoding, env cap, upstream-failure fallback.
2026-09-25 12:32:36 +02:00
ulihhhh 5b4931572a Merge upstream/main into feature/catalonia-cctv-cameras
Keeps PR #595's Catalonia CCTV pack in sync with upstream's DelDOT
CCTV pack (#699) and the wind/weather doc updates from #617. The
sources.js conflict was a false positive from git's line-based diff
interleaving two structurally similar but independent loader
functions (loadCataloniaSourcesFromOpenData / loadDelDOTSourcesFromOpenData);
resolved by keeping both as complete, separate functions.

Full unit suite passes (4743/4743, 1 pre-existing Node-version skip).
2026-09-23 12:12:58 +02:00
0251c74109 feat(weather): add globe wind, observed weather and cyclone context (#617)
Wind (NOAA GFS and ECMWF IFS: animated particles, colour field, a reading at map centre), observed weather (NOAA MRMS radar, GOES and NESDIS infrared clouds, lightning density) on one shared history timeline, NHC and CPHC cyclone advisories with tracks and cones, and a WEATHER panel in the right rail. On 3D Tiles the observed products render as raised shells with a sharper window around the view.

Co-authored-by: Gustavo Beneduzi <[email protected]>
Co-authored-by: Daniel Slay <[email protected]>
Co-authored-by: Rehaan Delmotra <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
2026-09-22 17:45:39 -05:00
ulihhhhandClaude Sonnet 5 ae661db7ab feat(cctv): add Catalonia (Servei Català de Trànsit) as a keyless CCTV source pack
One WFS/GML XML feed (~135 cameras) aggregating three publishers under a
`font` field: SCT's own highway cameras plus hotlinked Barcelona (IMI) and
Terrassa municipal cameras. Frame URLs are checked against a small host
allowlist rather than one pinned origin, and every non-SCT camera carries
its real owner as a `credit` shown beside the shared provider. The feed
carries no compass heading, so every camera loads at low heading confidence
(same as TfL and Fintraffic), and ground elevation is primed per publisher
rather than one flat prior.

SCT's own frame link needed a workaround: RenderService always 302s to a
second endpoint (TransitCamera) on a Location the upstream hardcodes as
plain http even when requested over https — refused by fetchWithinHost's
same-origin (scheme-included) redirect policy, by design (stops an upstream
steering a host-pinned request into a plaintext downgrade). Separately,
mct.gencat.cat's TLS setup fails the handshake with Node's fetch outright
(ERR_SSL_WRONG_SIGNATURE_TYPE) even though other HTTP clients complete it.
The loader builds the TransitCamera URL itself, over plain http, from
RenderService's sctidcam id, instead of registering the broken upstream
link — the only transport this host actually serves to this runtime.

Verified against the live feed and the production fetch path
(fetchCctvImageFromUpstream): all 135 cameras return real image bytes, 0
false positives. Ambient-card refresh cadence added to src/data/cctvLod.js
(3 minutes), matching the upstream update rate measured empirically (no
change inside 64s, changed within ~90-150s) — the same cadence already used
for Caltrans/TfL/Ontario/TxDOT.

CCTV_CATALONIA_MAX_SOURCES sets the cap and CCTV_CATALONIA_ENABLED=0 turns
the pack off. No overlap with any existing pack (checked catalog.js and the
git history for Spain/Catalonia/Barcelona coverage: none exists).

Verified before this commit: format, check:boundaries, unit suite (3692
tests), and build all green.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-15 18:07:40 +02:00
Bilawal Sidhuandrileygramlich 409e27d7f9 feat(cctv): add the Open Calgary camera pack (#514)
Supersedes #438 by @rileygramlich, ported onto the current component layout with fixes from review.

Verified before merge: format, package boundaries, unit suite, build, and the browser tracking suite; a browser harness for the change where one applies; adversarial review applied.

Co-authored-by: rileygramlich <[email protected]>
2026-09-14 19:45:52 -05:00
12790b36c6 feat(cctv): seven camera packs, semantic labels, terrain-clear monitor planes (#433)
Seven contributed CCTV camera packs (Ontario 511, Fintraffic Finland, DriveBC, TxDOT Texas, Estonia Tallinn + Tarktee, Warendorf, Live Traffic NSW) on a fair per-pack catalog cap; semantic camera labels; monitor planes lifted clear of the terrain from a precomputed, bundled ground-height dataset. Default catalog 800 → 3,446 cameras. Full context in PR #433.

Co-authored-by: sendmebits <[email protected]>
Co-authored-by: avocadoAgent <[email protected]>
Co-authored-by: Alex Harvey <[email protected]>
Co-authored-by: Jason Meredith <[email protected]>
Co-authored-by: Daniel Smith <[email protected]>
Co-authored-by: Vladimir Sobolev <[email protected]>
Co-authored-by: Matthias Schneider <[email protected]>
Co-authored-by: Cyber Knight <[email protected]>
Co-authored-by: NovaSoft Australia <[email protected]>
2026-09-13 21:48:33 -05:00
Sameh Khamis c69416ff6b style: adopt formatting for CCTV and radio provider modules 2026-09-12 12:09:04 -07:00
Sameh Khamis 79b4929b88 refactor: extract CCTV media and radio directory providers 2026-09-12 12:09:02 -07:00