feat(infra): GET /api/infrastructure Overpass nuclear markers (bbox) #36

Merged
sirius merged 2 commits from osint-dashboard/t_5955729a-osint-get-api-infrastructure-overpass-nu into master 2026-08-31 22:22:48 -04:00
Owner

Summary

New GET /api/infrastructure?types=nuclear&bbox=minlon,minlat,maxlon,maxlat overlay: Overpass nwr[power=plant][plant:source=nuclear] markers normalized to {id,name,lat,lon,type,extra}.

Details

  • bbox required (missing -> 400); unknown type -> 422.
  • One in-flight query per 0.25deg-quantized bbox (reuses the per-key lock); 25s server query via [timeout:25], 30s client headroom.
  • Identifying OSINT_USER_AGENT (Overpass 406s spoofed browser UAs).
  • 24h TTL cache per quantized bbox.
  • overlay_catalog() entry infra_nuclear (kind=points).
  • Implemented nuclear only; types= enum is shaped for trivial military/hospital later (no transport changes).

Tests

tests/test_infrastructure.py (8 tests, all passing): Overpass JSON -> markers, way center + unnamed fallback, missing bbox 400, unknown type 422, route returns markers, catalog entry, cache hit does not refetch. Live query smoke-tested against overpass-api.de (Cattenom NPP returned correctly).

Full suite: 190 passed, 17 skipped.

## Summary New `GET /api/infrastructure?types=nuclear&bbox=minlon,minlat,maxlon,maxlat` overlay: Overpass `nwr[power=plant][plant:source=nuclear]` markers normalized to `{id,name,lat,lon,type,extra}`. ## Details - bbox required (missing -> 400); unknown type -> 422. - One in-flight query per 0.25deg-quantized bbox (reuses the per-key lock); 25s server query via `[timeout:25]`, 30s client headroom. - Identifying `OSINT_USER_AGENT` (Overpass 406s spoofed browser UAs). - 24h TTL cache per quantized bbox. - `overlay_catalog()` entry `infra_nuclear` (kind=points). - Implemented nuclear only; `types=` enum is shaped for trivial military/hospital later (no transport changes). ## Tests `tests/test_infrastructure.py` (8 tests, all passing): Overpass JSON -> markers, way `center` + unnamed fallback, missing bbox 400, unknown type 422, route returns markers, catalog entry, cache hit does not refetch. Live query smoke-tested against overpass-api.de (Cattenom NPP returned correctly). Full suite: 190 passed, 17 skipped.
sirius added 1 commit 2026-08-31 21:29:49 -04:00
Overpass nwr power=plant + plant:source=nuclear, bbox-required, one
in-flight per quantized bbox, 25s server query with identifying UA,
24h TTL cache. Normalized to {id,name,lat,lon,type,extra}. overlay_catalog
entry infra_nuclear. Missing bbox 400; unknown type 422.
sirius added 1 commit 2026-08-31 22:11:05 -04:00
Keep both overlay_catalog entries: infra_nuclear (this PR) and
conflicts (already on master). Disjoint layers.
sirius merged commit 5815ccb4d4 into master 2026-08-31 22:22:48 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: sirius/osint-dashboard#36
No description provided.