# aurtechmx/openlidarviewer architecture

> Architecture diagram of the GitHub repository aurtechmx/openlidarviewer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aurtechmx/openlidarviewer
- Repository: https://github.com/aurtechmx/openlidarviewer

## Overview

OpenLiDARViewer is a local-first browser application for exploring point clouds and LiDAR scans. The main workflow is to open a local file or supported remote dataset, decode or stream it, inspect it in the 3D viewer, then measure, analyze terrain, and export results. Other documented capabilities include coordinate handling, scan comparison, annotations, and saved workflows. Edges are limited to relationships stated in the README or visible in indexed source references; several subsystems are represented at directory level because their implementation was not sampled.

Main entry points: [`src/app/openScan.ts`](https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/openScan.ts) (Open scan), [`src/app/openStreaming.ts`](https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/openStreaming.ts) (Large-scan streaming), [`src/render/Viewer.ts`](https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/Viewer.ts) (3D viewer), [`src/geo/CrsService.ts`](https://github.com/aurtechmx/openlidarviewer/blob/main/src/geo/CrsService.ts) (Coordinate service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Open and stream"]
  node_open["Open scan<br/>[openScan.ts]"]
  node_streaming["Large-scan streaming<br/>[openStreaming.ts]"]
  node_io["Format readers"]
  node_copc["COPC streaming"]
  node_ept["EPT streaming"]
  node_tiles["3D Tiles"]
  node_heavy["Out-of-core data"]
end

subgraph group_view["Explore scans"]
  node_viewer["3D viewer<br/>[Viewer.ts]"]
  node_navigation["Camera navigation<br/>[NavController.ts]"]
  node_measure["Measurement tools"]
  node_annotations["Scan annotations"]
  node_compare["Scan comparison<br/>[comparePair.ts]"]
end

subgraph group_analysis["Analyze data"]
  node_terrain["Terrain analysis"]
  node_raster["Terrain raster engine"]
  node_features["Feature extraction"]
  node_intelligence["Scan intelligence"]
end

subgraph group_outputs["Save and export"]
  node_export["Export products"]
  node_reports["PDF reports<br/>[ReportEngine.ts]"]
  node_workflows["Saved workflows"]
end

subgraph group_foundation["Spatial foundations"]
  node_coordinates["Coordinate service<br/>[CrsService.ts]"]
  node_crs["CRS definitions<br/>[crs.ts]"]
  node_session["Session persistence<br/>[session.ts]"]
  node_units["Units<br/>[units.ts]"]
end

node_user(("Scan user"))

node_user -->|"opens dataset"| node_open
node_open -->|"loads formats"| node_io
node_open -->|"dispatches streaming"| node_streaming
node_streaming -->|"streams COPC"| node_copc
node_streaming -->|"streams EPT"| node_ept
node_streaming -->|"streams tiles"| node_tiles
node_streaming -->|"bounds memory"| node_heavy
node_open -->|"presents scan"| node_viewer
node_user -->|"navigates scan"| node_viewer
node_viewer -->|"supports navigation"| node_navigation
node_user -->|"measures scan"| node_measure
node_user -->|"runs analysis"| node_terrain
node_terrain -->|"builds terrain rasters"| node_raster
node_user -->|"reviews features"| node_features
node_user -->|"inspects findings"| node_intelligence
node_user -->|"annotates findings"| node_annotations
node_user -->|"compares scans"| node_compare
node_user -->|"exports results"| node_export
node_user -->|"creates reports"| node_reports
node_user -->|"saves workflow"| node_workflows
node_coordinates -->|"resolves CRS"| node_crs
node_coordinates -.->|"provides spatial context"| node_units
node_open -->|"imports session"| node_session

click node_open "https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/openScan.ts"
click node_streaming "https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/openStreaming.ts"
click node_io "https://github.com/aurtechmx/openlidarviewer/tree/main/src/io"
click node_copc "https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/copc"
click node_ept "https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/ept"
click node_tiles "https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/tiles3d"
click node_heavy "https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/heavy"
click node_viewer "https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/Viewer.ts"
click node_navigation "https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/NavController.ts"
click node_measure "https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/measure/MeasureController.ts"
click node_annotations "https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/annotate/AnnotationController.ts"
click node_compare "https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/comparePair.ts"
click node_terrain "https://github.com/aurtechmx/openlidarviewer/tree/main/src/terrain"
click node_raster "https://github.com/aurtechmx/openlidarviewer/blob/main/src/terrain/engine/TerrainRasterEngine.ts"
click node_features "https://github.com/aurtechmx/openlidarviewer/blob/main/src/features/FeatureExtractionService.ts"
click node_intelligence "https://github.com/aurtechmx/openlidarviewer/tree/main/src/intelligence"
click node_export "https://github.com/aurtechmx/openlidarviewer/tree/main/src/export"
click node_reports "https://github.com/aurtechmx/openlidarviewer/blob/main/src/report/ReportEngine.ts"
click node_workflows "https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/workflow/workflowRecorder.ts"
click node_coordinates "https://github.com/aurtechmx/openlidarviewer/blob/main/src/geo/CrsService.ts"
click node_crs "https://github.com/aurtechmx/openlidarviewer/blob/main/src/io/crs.ts"
click node_session "https://github.com/aurtechmx/openlidarviewer/blob/main/src/io/session.ts"
click node_units "https://github.com/aurtechmx/openlidarviewer/blob/main/src/units/units.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_open,node_streaming,node_io,node_copc,node_ept,node_tiles,node_heavy,node_user toneBlue
class node_viewer,node_navigation,node_measure,node_annotations,node_compare toneAmber
class node_terrain,node_raster,node_features,node_intelligence toneMint
class node_export,node_reports,node_workflows toneRose
class node_coordinates,node_crs,node_session,node_units toneIndigo
```

## Components

### Open and stream

- [Open scan](https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/openScan.ts): `src/app/openScan.ts`
- [Large-scan streaming](https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/openStreaming.ts): `src/app/openStreaming.ts`
- [Format readers](https://github.com/aurtechmx/openlidarviewer/tree/main/src/io): `src/io`
- [COPC streaming](https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/copc): `src/io/copc`
- [EPT streaming](https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/ept): `src/io/ept`
- [3D Tiles](https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/tiles3d): `src/io/tiles3d`
- [Out-of-core data](https://github.com/aurtechmx/openlidarviewer/tree/main/src/io/heavy): `src/io/heavy`

### Explore scans

- [3D viewer](https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/Viewer.ts): `src/render/Viewer.ts`
- [Camera navigation](https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/NavController.ts): `src/render/NavController.ts`
- [Measurement tools](https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/measure/MeasureController.ts): `src/render/measure/MeasureController.ts`
- [Scan annotations](https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/annotate/AnnotationController.ts): `src/render/annotate/AnnotationController.ts`
- [Scan comparison](https://github.com/aurtechmx/openlidarviewer/blob/main/src/app/comparePair.ts): `src/app/comparePair.ts`

### Analyze data

- [Terrain analysis](https://github.com/aurtechmx/openlidarviewer/tree/main/src/terrain): `src/terrain`
- [Terrain raster engine](https://github.com/aurtechmx/openlidarviewer/blob/main/src/terrain/engine/TerrainRasterEngine.ts): `src/terrain/engine/TerrainRasterEngine.ts`
- [Feature extraction](https://github.com/aurtechmx/openlidarviewer/blob/main/src/features/FeatureExtractionService.ts): `src/features/FeatureExtractionService.ts`
- [Scan intelligence](https://github.com/aurtechmx/openlidarviewer/tree/main/src/intelligence): `src/intelligence`

### Save and export

- [Export products](https://github.com/aurtechmx/openlidarviewer/tree/main/src/export): `src/export`
- [PDF reports](https://github.com/aurtechmx/openlidarviewer/blob/main/src/report/ReportEngine.ts): `src/report/ReportEngine.ts`
- [Saved workflows](https://github.com/aurtechmx/openlidarviewer/blob/main/src/render/workflow/workflowRecorder.ts): `src/render/workflow/workflowRecorder.ts`

### Spatial foundations

- [Coordinate service](https://github.com/aurtechmx/openlidarviewer/blob/main/src/geo/CrsService.ts): `src/geo/CrsService.ts`
- [CRS definitions](https://github.com/aurtechmx/openlidarviewer/blob/main/src/io/crs.ts): `src/io/crs.ts`
- [Session persistence](https://github.com/aurtechmx/openlidarviewer/blob/main/src/io/session.ts): `src/io/session.ts`
- [Units](https://github.com/aurtechmx/openlidarviewer/blob/main/src/units/units.ts): `src/units/units.ts`

### Other components

- **Scan user**

## Connections

- Scan user → Open scan: opens dataset
- Open scan → Format readers: loads formats (evidence: `src/app/openScan.ts`)
- Open scan → Large-scan streaming: dispatches streaming (evidence: `src/app/openScan.ts`)
- Large-scan streaming → COPC streaming: streams COPC
- Large-scan streaming → EPT streaming: streams EPT
- Large-scan streaming → 3D Tiles: streams tiles
- Large-scan streaming → Out-of-core data: bounds memory
- Open scan → 3D viewer: presents scan (evidence: `src/app/openScan.ts`)
- Scan user → 3D viewer: navigates scan
- 3D viewer → Camera navigation: supports navigation
- Scan user → Measurement tools: measures scan
- Scan user → Terrain analysis: runs analysis
- Terrain analysis → Terrain raster engine: builds terrain rasters (evidence: `src/terrain/engine/TerrainRasterEngine.ts`)
- Scan user → Feature extraction: reviews features
- Scan user → Scan intelligence: inspects findings
- Scan user → Scan annotations: annotates findings
- Scan user → Scan comparison: compares scans
- Scan user → Export products: exports results
- Scan user → PDF reports: creates reports
- Scan user → Saved workflows: saves workflow
- Coordinate service → CRS definitions: resolves CRS (evidence: `src/geo/CrsService.ts`)
- Coordinate service → Units: provides spatial context
- Open scan → Session persistence: imports session (evidence: `src/app/openScan.ts`)
