Honest pins and paths: geocode precision, type-gated paths, impossible-speed stops (#236)

Backend: _geocode_location now returns {lat, lng, location_type}, so the
precision rides onto the call doc and, unchanged via _resolve_location_pair,
onto the incident pin. Display-only: every correlator read indexes lat/lng.

Frontend: pins styled by precision (rooftop / interpolated ring /
GEOMETRIC_CENTER dashed uncertainty circle labelled with the spoken place /
unverified pre-#23 pins ghosted). liveWall.pathStops() is shared by the map
and the call spine: only police/accident incidents with a pursuit tag draw a
numbered path; others get unnumbered call dots. Segments over >10 min gaps or
talkgroup changes are dashed, stops implying >8 km/min are ghosted off the
path, paths >20 km get a "may be merged" badge. New optional MapView prop
pulseIncidentIds (wired by #238).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Logan Cusano
2026-10-05 03:28:00 -04:00
co-authored by Claude Opus 5.5
parent 6e462720a1
commit 6bf072973c
7 changed files with 499 additions and 74 deletions
+10 -3
View File
@@ -690,8 +690,15 @@ async def _geocode_location(
"""
Geocode using Google Maps Geocoding API, biased toward the channel's area.
Returns {"lat": float, "lng": float}, or None if geocoding fails or the
result lands outside the area this channel covers.
Returns {"lat": float, "lng": float, "location_type": str}, or None if
geocoding fails or the result lands outside the area this channel covers.
server-26#236: `location_type` (ROOFTOP / RANGE_INTERPOLATED /
GEOMETRIC_CENTER) rides along with the coordinates so the map can show how
precise a pin is — a route centroid must not draw the same teardrop as a
rooftop. It is display-only: every consumer of these coords reads only
"lat"/"lng", and the dict is stored as-is on the call doc and, through
incident_correlator._resolve_location_pair, on the incident pin.
THE REFERENCE POINT IS THE TALKGROUP, NOT THE NODE (server-26#6 / #37). This
used to reject anything more than geocode_max_km (40km) from the receiving
@@ -801,7 +808,7 @@ async def _geocode_location(
f"{dist_km:.1f}km from the receiving node, past {max_km:.1f}km — "
f"accepted anyway: the query names its own region, not the node's"
)
coords = {"lat": lat, "lng": lng}
coords = {"lat": lat, "lng": lng, "location_type": location_type}
logger.info(
f"Geocoded '{location_str}' → {coords} "
f"({dist_km:.1f}km from {ref_label}) [{location_type}]"