Merge origin/master into CelesTrak satellites API

Keep satellites import (this PR) and place.reverse_geocode from #37.
This commit is contained in:
Sirius DevOps 2026-08-31 23:15:08 -04:00
commit b9558431f2
No known key found for this signature in database
7 changed files with 565 additions and 5 deletions

View file

@ -62,6 +62,7 @@ from live_layers import (
fetch_infrastructure, overlay_catalog, parse_bbox, UpstreamRateLimited,
)
from satellites import fetch_satellites, parse_groups, DEFAULT_GROUPS
from place import reverse_geocode
logging.basicConfig(level=logging.INFO)
logger = structlog.get_logger("osint.dashboard")
@ -1845,6 +1846,25 @@ async def list_storms():
_upstream_or_502(exc, "storms")
@app.get("/api/place")
async def get_place(
lat: float = Query(..., ge=-90, le=90),
lon: float = Query(..., ge=-180, le=180),
):
"""Nominatim reverse geocode for the map \"What's here?\" dossier.
Identifying ``OSINT_USER_AGENT``, 1 req/s, 60s cache, 500 keys. The HUD
lists already-loaded overlay entities client-side — this route does not
refetch aircraft/vessels/cameras/fires.
"""
try:
return overlay_json(await reverse_geocode(lat, lon), 60)
except ValueError as exc:
raise HTTPException(422, str(exc)) from exc
except Exception as exc:
_upstream_or_502(exc, "nominatim")
_GPSJAM_DATE = re.compile(r"^\d{4}-\d{2}-\d{2}$")