feat(map): chokepoint preset catalog + vessels ?src= filter #27

Merged
sirius merged 1 commit from feat/chokepoint-presets-vessel-src into master 2026-08-29 16:59:35 -04:00
Owner

Summary

Phase A backend for chokepoint presets (plan 2026-08-29_175519-osint-unique-layers.md).

GET /api/map/chokepoints

Static five-strait fly-to catalog — pure data, no VesselAPI calls. Returns { "chokepoints": [ { id, title, bbox, center, zoom, vesselapi } ] }. Only Hormuz flags vesselapi: true (matches the default poll box); the other four straits are AISStream-only until a human later spends quota.

id title bbox vesselapi
hormuz Strait of Hormuz 25.5,55.4,27.3,57.2 true
bab_el_mandeb Bab el-Mandeb 12.0,42.8,13.5,44.3 false
suez Suez / N. Red Sea 29.5,32.0,31.0,33.5 false
malacca Malacca / Singapore 1.0,103.0,2.5,104.5 false
taiwan Taiwan Strait 23.5,119.0,25.0,120.5 false

Every box stays within the VesselAPI |dLat|+|dLon| ≤ 4 span rule (validated in tests).

GET /api/vessels?src=

New optional src=aisstream|vesselapi|all (default all) filters the union store by extra.src, so a Hormuz view can skip the ~5k CONUS AISStream rows. Invalid values 422.

Tests

  • Span validation of all five boxes against vesselapi.validate_bbox_span.
  • Catalog 200 + exact JSON shape; only Hormuz vesselapi=true.
  • src= filter over a seeded union store + through the API (400/422 on bad value).

Full suite: 158 passed, 16 skipped (DB-gated integration).

Out of scope

Leaflet frontend (separate card), GPSJAM, extra VesselAPI boxes, CFAR.

## Summary Phase A backend for chokepoint presets (plan `2026-08-29_175519-osint-unique-layers.md`). ### `GET /api/map/chokepoints` Static five-strait fly-to catalog — pure data, **no VesselAPI calls**. Returns `{ "chokepoints": [ { id, title, bbox, center, zoom, vesselapi } ] }`. Only Hormuz flags `vesselapi: true` (matches the default poll box); the other four straits are AISStream-only until a human later spends quota. | id | title | bbox | vesselapi | |---|---|---|---| | hormuz | Strait of Hormuz | 25.5,55.4,27.3,57.2 | true | | bab_el_mandeb | Bab el-Mandeb | 12.0,42.8,13.5,44.3 | false | | suez | Suez / N. Red Sea | 29.5,32.0,31.0,33.5 | false | | malacca | Malacca / Singapore | 1.0,103.0,2.5,104.5 | false | | taiwan | Taiwan Strait | 23.5,119.0,25.0,120.5 | false | Every box stays within the VesselAPI `|dLat|+|dLon| ≤ 4` span rule (validated in tests). ### `GET /api/vessels?src=` New optional `src=aisstream|vesselapi|all` (default `all`) filters the union store by `extra.src`, so a Hormuz view can skip the ~5k CONUS AISStream rows. Invalid values 422. ### Tests - Span validation of all five boxes against `vesselapi.validate_bbox_span`. - Catalog 200 + exact JSON shape; only Hormuz `vesselapi=true`. - `src=` filter over a seeded union store + through the API (400/422 on bad value). Full suite: 158 passed, 16 skipped (DB-gated integration). ## Out of scope Leaflet frontend (separate card), GPSJAM, extra VesselAPI boxes, CFAR.
sirius added 1 commit 2026-08-29 14:01:44 -04:00
- GET /api/map/chokepoints: static five-strait fly-to catalog (Hormuz, Bab
  el-Mandeb, Suez, Malacca, Taiwan) with bbox/center/zoom/vesselapi. No
  VesselAPI calls; only Hormuz flags vesselapi=true.
- GET /api/vessels?src=aisstream|vesselapi|all (default all) filters the
  union store by provider so a Hormuz view skips ~5k CONUS AISStream rows.
- Tests: span validation of all five boxes, catalog 200 shape, src filter.
sirius merged commit 4c9ffb9673 into master 2026-08-29 16:59:35 -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#27
No description provided.