feat(geofence): hear quakes, WFIGS incidents, and news pins

New hits carry a frozen evidence pack. adsb/ais/firms payloads stay
unchanged, and cameras are never passed to record_and_notify.
This commit is contained in:
Sirius DevOps 2026-11-14 00:40:10 -05:00
commit d878655617
7 changed files with 990 additions and 26 deletions

View file

@ -743,18 +743,25 @@ def transform_wfigs_incidents(fc: dict | None) -> list[dict]:
continue
props = feat.get("properties") or {}
name = str(props.get("IncidentName") or "Incident").strip()
extra = {
"acres": props.get("IncidentSize"),
"contained": props.get("PercentContained"),
"state": props.get("POOState"),
"category": props.get("IncidentTypeCategory"),
"cause": props.get("FireCause"),
"discovered": props.get("FireDiscoveryDateTime"),
"src": "wfigs",
}
irwin = props.get("IrwinID")
if irwin:
extra["irwin_id"] = str(irwin)
ufi = props.get("UniqueFireIdentifier")
if ufi:
extra["unique_fire_id"] = str(ufi)
out.append(to_marker(
name, lat, lon,
label=name,
extra={
"acres": props.get("IncidentSize"),
"contained": props.get("PercentContained"),
"state": props.get("POOState"),
"category": props.get("IncidentTypeCategory"),
"cause": props.get("FireCause"),
"discovered": props.get("FireDiscoveryDateTime"),
"src": "wfigs",
},
extra=extra,
))
return out
@ -1084,17 +1091,27 @@ def _wfigs_params(bbox: str | None, *, offset_m: float = 250.0) -> dict:
return params
async def fetch_fire_incidents(bbox: str | None, limit: int = DEFAULT_LIMIT) -> list[dict]:
_WFIGS_INCIDENT_FIELDS = (
"IncidentName,IncidentSize,FireDiscoveryDateTime,POOState,"
"PercentContained,IncidentTypeCategory,FireCause,"
"IrwinID,UniqueFireIdentifier"
)
async def load_fire_incidents(bbox: str | None) -> list[dict]:
"""WFIGS points for a bbox. No last-known mutation, no aircraft correlate."""
params = _wfigs_params(bbox)
params["outFields"] = (
"IncidentName,IncidentSize,FireDiscoveryDateTime,POOState,"
"PercentContained,IncidentTypeCategory,FireCause"
)
params["outFields"] = _WFIGS_INCIDENT_FIELDS
async def _load():
return transform_wfigs_incidents(await _get_json(WFIGS_INCIDENTS, params))
rows = await _ttl_get(f"wfigs:inc:{bbox_cell_key(bbox)}", 600.0, _load)
return list(rows or [])
async def fetch_fire_incidents(bbox: str | None, limit: int = DEFAULT_LIMIT) -> list[dict]:
rows = await load_fire_incidents(bbox)
fire_last_known[:] = list(rows)
if rows and aircraft_last_known:
from fire_aircraft import correlate_and_notify