Skip to content

[WIP] Refactor viz.py to attempt to improve code quality and better display AIS tracks#72

Draft
elliott-ruebush wants to merge 17 commits into
mainfrom
feature/vis_improvements_for_ais
Draft

[WIP] Refactor viz.py to attempt to improve code quality and better display AIS tracks#72
elliott-ruebush wants to merge 17 commits into
mainfrom
feature/vis_improvements_for_ais

Conversation

@elliott-ruebush

@elliott-ruebush elliott-ruebush commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extract nps_active_space/viz/ package from the monolithic scripts/viz.py (CLI shim remains at scripts/viz.py).
  • Drape vessel annotations at sea level onto the DEM via DemElevationSampler, flat sea-surface fast path, and merged annotation meshes for PyVista performance.
  • Add --vessels to preview raw MXAK AIS tracks; improve CLI validation and logging.
  • Some scripting for downsampling AIS data (tbd if we want to keep this or not)
  • Posix-path fixes for load_layered_activespace and clearer errors when active-space layers are missing.

Builds off #68 (feature/ground_truthing_ais)

Manual Testing

  • pytest (116 passed locally)
  • python -m nps_active_space.scripts.viz GLBALSTL2024 -e <env> -a with AIS annotations are properly displayed (both the audible/inaudible boundaries on the polylines and the polylines themselves
  • Same deployment with --vessels for raw AIS vessel tracks instead of annotations
  • ADSB annotations with real altitude (should use stored altitudes rather than just putting on the surface)
  • --active-space on a deployment with layered GeoJSON output

@elliott-ruebush elliott-ruebush marked this pull request as draft June 23, 2026 00:15
@elliott-ruebush elliott-ruebush changed the title Refactor viz for AIS tracks and annotation elevation draping Refactor viz.py for clarity and better display of AIS tracks Jun 23, 2026
@elliott-ruebush elliott-ruebush changed the title Refactor viz.py for clarity and better display of AIS tracks Refactor viz.py to attempt to improve code quality and better display AIS tracks Jun 23, 2026
@elliott-ruebush elliott-ruebush changed the title Refactor viz.py to attempt to improve code quality and better display AIS tracks [WIP] Refactor viz.py to attempt to improve code quality and better display AIS tracks Jun 23, 2026
@elliott-ruebush elliott-ruebush force-pushed the feature/ground_truthing_ais branch from 93f8c07 to a09b4ab Compare June 25, 2026 17:16
@elliott-ruebush elliott-ruebush force-pushed the feature/vis_improvements_for_ais branch 4 times, most recently from 07b40ce to 431404e Compare June 27, 2026 16:33
elliott-ruebush and others added 16 commits July 6, 2026 18:14
Move track loading to utils for ground truthing and viz; add --track-source CLI with source-specific z handling. Not finalized — needs review and on-network smoke tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace deprecated -v/--vessels with --track-source (GPS/ADSB/AIS), route viz
through load_tracks with include_faa_paths=False, keep ADSB on the NVSPL clock
(no site timezone shift), and add loader tests plus docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@elliott-ruebush elliott-ruebush changed the base branch from feature/ground_truthing_ais to main July 6, 2026 22:29
@elliott-ruebush elliott-ruebush force-pushed the feature/vis_improvements_for_ais branch from 431404e to d963e99 Compare July 6, 2026 22:29
@elliott-ruebush elliott-ruebush changed the base branch from main to fix/ci-test-failures July 6, 2026 22:49
@elliott-ruebush elliott-ruebush changed the base branch from fix/ci-test-failures to main July 6, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant