navi/backend/services
malice c1d57446c2
navi-offroute: vectorize road_terminus_transitions (O2b, perf) (#51)
Replace the per-road-cell Python 8-neighbour scan with a single 3x3 binary
dilation of the off-network mask (scipy.ndimage), AND'd with the road/track
mask. `border_value=0` treats out-of-bounds neighbours as on-network, matching
the scalar version's OOB skip -- NOT np.roll, which would wrap the raster edges
and fabricate phantom neighbours. A road cell is never off-network itself, so
dilating with the centre included is equivalent to the loop's strict-neighbour
test; the surviving cell set and the 2 directed foot<->vehicle tuples per cell
are identical (only emission order differs; cap/kernel are order-independent).

Synthetic eyeball benchmark (1234x470, dense road block, worst case for the
loop's early-break): scalar 843 ms -> vector 9.3 ms; set-equal True. Targets the
~3.75s road_terminus stage of Route B's gather_transition_cells.

Adds test_road_terminus_dilation_no_wrap (np.roll regression guard); existing
test_road_terminus_transitions_pure_raster + gather/cost parity tests unchanged.

Co-authored-by: mj <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 02:50:26 -06:00
..
navi_admin fix: include navi-offroute (8428) in navi-admin fleet list 2026-05-23 23:17:23 -06:00
navi_config Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00
navi_contacts Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00
navi_geo shared: promote dem.py to shared/ (prep for navi-offroute) (#9) 2026-05-22 22:42:47 -06:00
navi_landclass Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00
navi_offroute navi-offroute: vectorize road_terminus_transitions (O2b, perf) (#51) 2026-05-28 02:50:26 -06:00
navi_places navi-places: place_cache TTL (default 30 days) (#33) 2026-05-26 16:53:25 -06:00
navi_traffic Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00