2.8 KiB
2.8 KiB
Native traffic signal parity with QGIS
Goal
Move traffic-signal ownership from the QGIS editing chain into the native road compiler and Workbench. Existing QGIS signal assemblies remain import/export compatibility data during migration, but native overrides become the long-term source for generation, editing, and Blender/Cesium/preview delivery.
Confirmed Facts
- QGIS currently edits
traffic_signal_assemblies.geojson; this is the migration input/output contract, not the desired long-term authority. scripts/reimport-gpkg.jsvalidates and reimports that legacy layer.scripts/build-area.jscurrently derives runtimetraffic_signals.jsonfrom the edited assemblies; the native path must replace this dependency.- Existing native road layers do not read traffic-signal artifacts. Historical native Cesium work intentionally omitted signal runtime assets.
- Stable signal identity and editable fields already include
signal_uid, enabled state, source/control/approach IDs, arm direction, pose, mast reach, and phase-group/runtime data.
Requirements
- R1: Native compile/workbench must own a versioned area-local signal model and override artifact, with an explicit one-time/import compatibility path from existing QGIS assemblies.
- R2: Workbench state must expose signal provenance and the existing editable signal fields using stable IDs, and support generating, moving, rotating, and deleting signal assemblies.
- R3: Native compile and preview delivery must generate runtime signal data directly from the native model, preserving enabled/disabled state, arm direction/pose, and phase-group data without requiring QGIS.
- R4: A compatibility adapter must import/export the existing QGIS assembly format during migration and preserve legacy signal IDs where possible.
Scope Boundary
- Native signal model and overrides are the long-term source of truth.
- QGIS GeoJSON/GeoPackage support is transitional compatibility only; do not make native compile depend on QGIS or regenerate native edits from QGIS.
- Do not redesign signal geometry, timing logic, or vehicle behavior in this task.
Acceptance Criteria
- A native compile/reopen round trip preserves edited signal assemblies, stable IDs, enabled state, and provenance without QGIS running.
- The Road Workbench can generate, inspect, move, rotate, and delete signal assemblies, then save durable edits without breaking QGIS reimport.
- Native Blender/Cesium/preview consume runtime signal data generated from the native model, including disabled signals being omitted from runtime.
- QGIS import/export compatibility and legacy build stages continue to pass while the migration adapter exists.
- Nantaizi has documented native-only and QGIS-imported round trips.