Files
osmWorkflow/.trellis/tasks/archive/2026-08/08-17-native-road-center-lines/prd.md

2.8 KiB

Native road center lines

Goal

Restore the existing osm2streets-style road-centre dashed markings in the native-road provider before treating native output as ready for broader quality gates or new-area validation.

Confirmed Facts

  • Nantaizi's existing osm2streets_web_out/center_lines.geojson has 885 type="center line" polygons. Its sampled dash geometry is approximately 2.00m long by 0.25m wide.
  • The legacy extraction excludes centre lines that overlap crosswalk zones and that fall on service driving polygons (build-osm2streets-qgis.js:474-480).
  • Native output currently has only same-direction lane_separators; it has no center_lines.geojson, so a bidirectional road's directional carriageways lack their visual and semantic divider.
  • Existing Blender already owns a center_lines / Center Line material layer. Native must adapt to it rather than creating a second scene registry.

Requirements

  • R1: For supported non-service, bidirectional native road segments, emit a center_lines.geojson dashed centre divider derived from the canonical OSM centreline and the segment's two directional carriageways.
  • R2: Match the established visual baseline: yellow 0.25m-wide, 2m-long dashes, clipped away from ordinary junction cutbacks and control markings.
  • R3: Preserve source traceability: each dash records its native segment, source OSM way, involved directional roads, placement interval/rule, and a dedicated provenance value.
  • R4: Add the layer to compilation records, Road Workbench display/selection in Chinese, and the existing Blender/Cesium center_lines material path.
  • R5: Do not render a centre divider on one-way or highway=service segments; report invalid geometry instead of fabricating a divider.

Acceptance Criteria

  • Native Nantaizi output contains a valid layers/center_lines.geojson with source-traceable 2m x 0.25m dashed polygons.
  • No native centre dash intersects a generated crosswalk or vehicle stop line, and no dash reaches into the supported junction surface cutback.
  • The Workbench can toggle and select centre lines, presenting their source and rule in Chinese rather than calling them lane separators.
  • Native blender,cesium,preview consumes the layer using the existing center_lines material and does not run package.
  • Tests cover two-way generation, one-way/service skips, control-marking avoidance, provenance, output contract, and Workbench wiring.

Out Of Scope

  • Centre-line editing overrides, solid/double-centre-line semantics, arbitrary OSM overtaking interpretation, lane colouring changes, and other areas.

Key Decision

This task deliberately matches the existing stable visual layer first. It does not claim to infer a country-wide legal marking taxonomy from sparse OSM tags.