Rail LiDAR QA MVP
Overview
A local tool for validating LiDAR quality on railway infrastructure. Simulates drone flights over a PNOA LiDAR point cloud to detect coverage gaps, low-density zones, and shadow areas.
Workflow
- User loads
.laz point cloud file
- System reads point cloud and calculates general metrics
- User selects analysis zone (e.g., 20m track + embankment)
- Tool divides zone into 2D grid
- For each cell: calculates density, elevation range, coverage
- Simulates multiple drone passes from different positions
- Generates QA map with color coding
- Demo shows if capture is acceptable or needs repetition
Drone Pass Strategy
| Pass |
Coverage |
Purpose |
| P1 |
Track axis |
Global view of platform, track, ballast, embankment |
| P2 |
Right flank |
Reduce shadows on embankment face, ditch, ballast edge |
| P3 |
Left flank |
Confirm doubtful zones, improve density continuity |
| P4 |
Adaptive (optional) |
Target red cells after P1-P3 |
QA Traffic Light
- Green: Sufficient density and continuous coverage
- Yellow: Partial coverage, irregular density, needs review
- Red: Gap, shadow, low density, insufficient capture
Minimum Metrics
- Total point count
- Bounding box X/Y/Z
- Elevation range
- Mean points per square meter
- Green cell percentage
- Yellow cell percentage
- Red cell percentage
- QA score 0-100
Math Model
eje_via = principal_eigenvector(covariance(X, Y))
s = longitudinal projection on eje_via
d = transverse projection on normal_via
Error reduction per pass:
e_i,k+1 = max(e_floor, e_i,k * (1 - g_k * visibility_i,k)) + anomaly_i
Planner prioritizes cells with highest residual error for adaptive P4.
Tech Stack
- Python:
laspy, lazrs (LAZ reading), numpy (grid metrics)
- Three.js: 3D point cloud visualization
- Local HTTP server (Python stdlib)
- Windows launcher (
run_mvp.bat)
Color Classification
Points are classified visually:
- Green: Vegetation (high NIR response)
- Dark gray: Track/platform
- Ochre: Ballast/substructure
- Brown: Natural terrain/embankment
- Dark blue: Shadow/occlusion/water
European Sovereignty Narrative
- Galileo Open Service as GNSS base
- Galileo HAS for PPP high-precision corrections
- EGNOS for operational integrity layer
- Local processing, no external cloud
- PNOA LiDAR (CNIG) as free base data
Static Demo Generation
python src\build_static.py
Creates docs/ with Three.js viewer, preprocessed sample_analysis.json, and HTML report. Publishable to GitHub Pages or Vercel without uploading the .laz file.
Pitfalls
- MVP uses heuristic rules, not real AI
- Track detection may be manual or configurable in v1
- Precision depends on sensor, GNSS, IMU, calibration, and pass geometry
- Tool does NOT certify railway safety
1---2name: rail-lidar-qa-mvp3description: Rail LiDAR QA MVP - Local LiDAR quality validation for railway infrastructure using drone simulation, point cloud metrics, and 3D visualization.4---56# Rail LiDAR QA MVP78## Overview910A local tool for validating LiDAR quality on railway infrastructure. Simulates drone flights over a PNOA LiDAR point cloud to detect coverage gaps, low-density zones, and shadow areas.1112## Workflow13141. User loads `.laz` point cloud file152. System reads point cloud and calculates general metrics163. User selects analysis zone (e.g., 20m track + embankment)174. Tool divides zone into 2D grid185. For each cell: calculates density, elevation range, coverage196. Simulates multiple drone passes from different positions207. Generates QA map with color coding218. Demo shows if capture is acceptable or needs repetition2223## Drone Pass Strategy2425| Pass | Coverage | Purpose |26|------|----------|---------|27| P1 | Track axis | Global view of platform, track, ballast, embankment |28| P2 | Right flank | Reduce shadows on embankment face, ditch, ballast edge |29| P3 | Left flank | Confirm doubtful zones, improve density continuity |30| P4 | Adaptive (optional) | Target red cells after P1-P3 |3132## QA Traffic Light3334- **Green**: Sufficient density and continuous coverage35- **Yellow**: Partial coverage, irregular density, needs review36- **Red**: Gap, shadow, low density, insufficient capture3738## Minimum Metrics3940- Total point count41- Bounding box X/Y/Z42- Elevation range43- Mean points per square meter44- Green cell percentage45- Yellow cell percentage46- Red cell percentage47- QA score 0-1004849## Math Model5051```52eje_via = principal_eigenvector(covariance(X, Y))53s = longitudinal projection on eje_via54d = transverse projection on normal_via55```5657Error reduction per pass:58```59e_i,k+1 = max(e_floor, e_i,k * (1 - g_k * visibility_i,k)) + anomaly_i60```6162Planner prioritizes cells with highest residual error for adaptive P4.6364## Tech Stack6566- Python: `laspy`, `lazrs` (LAZ reading), `numpy` (grid metrics)67- Three.js: 3D point cloud visualization68- Local HTTP server (Python stdlib)69- Windows launcher (`run_mvp.bat`)7071## Color Classification7273Points are classified visually:74- Green: Vegetation (high NIR response)75- Dark gray: Track/platform76- Ochre: Ballast/substructure77- Brown: Natural terrain/embankment78- Dark blue: Shadow/occlusion/water7980## European Sovereignty Narrative8182- Galileo Open Service as GNSS base83- Galileo HAS for PPP high-precision corrections84- EGNOS for operational integrity layer85- Local processing, no external cloud86- PNOA LiDAR (CNIG) as free base data8788## Static Demo Generation8990```bat91python src\build_static.py92```93Creates `docs/` with Three.js viewer, preprocessed `sample_analysis.json`, and HTML report. Publishable to GitHub Pages or Vercel without uploading the `.laz` file.9495## Pitfalls96- MVP uses heuristic rules, not real AI97- Track detection may be manual or configurable in v198- Precision depends on sensor, GNSS, IMU, calibration, and pass geometry99- Tool does NOT certify railway safety