# yvind/omapmaker architecture

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

- Interactive diagram: https://gitdiagram.com/yvind/omapmaker
- Repository: https://github.com/yvind/omapmaker

## Overview

OmapMaker is a desktop application that turns classified LiDAR into georeferenced, magnetic-north-aligned orienteering maps and optional raster exports. The user selects files and a processing area, assigns or confirms coordinate systems, tunes map parameters with previews, then starts export. The worker handles LiDAR analysis and conversion and delegates preview or full generation; generation derives map features and serializes outputs. The README documents additional capabilities that are represented by their feature modules, though their internal wiring was not sampled.

Main entry points: [`src/generation/pipeline/mod.rs`](https://github.com/yvind/omapmaker/blob/main/src/generation/pipeline/mod.rs) (Tiled generation), [`src/app/worker.rs`](https://github.com/yvind/omapmaker/blob/main/src/app/worker.rs) (Background worker), [`src/app/controller.rs`](https://github.com/yvind/omapmaker/blob/main/src/app/controller.rs) (GUI controller), [`src/generation/export/mod.rs`](https://github.com/yvind/omapmaker/blob/main/src/generation/export/mod.rs) (Map and raster export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop workflow"]
  node_controller["GUI controller<br/>[controller.rs]"]
  node_worker["Background worker<br/>[worker.rs]"]
  node_ui["Map interface<br/>[mod.rs]"]
  node_params["Map parameters<br/>[mod.rs]"]
end

subgraph group_input["LiDAR preparation"]
  node_lidar["LiDAR operations<br/>[mod.rs]"]
  node_geometry["Geometry and projection<br/>[mod.rs]"]
end

subgraph group_generation["Map generation"]
  node_pipeline["Tiled generation<br/>[mod.rs]"]
  node_terrain["Terrain and contours<br/>[mod.rs]"]
  node_vegetation["Vegetation<br/>[mod.rs]"]
  node_buildings["Buildings<br/>[mod.rs]"]
  node_hydrology["Water and streams<br/>[mod.rs]"]
  node_otherfeatures["Other features<br/>[mod.rs]"]
  node_raster["Raster processing<br/>[mod.rs]"]
  node_inference["Optional stream model<br/>[mod.rs]"]
end

subgraph group_output["Map outputs"]
  node_mapmodel["Map representation<br/>[mod.rs]"]
  node_export["Map and raster export<br/>[mod.rs]"]
end

node_user(("Mapmaker"))
node_lidarfiles["LiDAR files"]
node_basemap["Map tile services"]
node_omapfile["Omap output"]
node_geotiff["GeoTIFF output"]

node_user -->|"tunes and selects"| node_ui
node_ui -->|"dispatches actions"| node_controller
node_controller -->|"sends tasks"| node_worker
node_worker -->|"returns events"| node_controller
node_controller -->|"updates parameters"| node_params
node_controller -->|"requests tiles"| node_basemap
node_worker -->|"analyzes and converts"| node_lidar
node_lidarfiles -->|"reads"| node_lidar
node_worker -->|"requests preview and generation"| node_pipeline
node_pipeline -->|"uses LiDAR data"| node_lidar
node_pipeline -->|"derives contours"| node_terrain
node_pipeline -->|"derives vegetation"| node_vegetation
node_pipeline -->|"derives buildings"| node_buildings
node_pipeline -->|"derives hydrology"| node_hydrology
node_pipeline -->|"derives features"| node_otherfeatures
node_pipeline -->|"processes rasters"| node_raster
node_pipeline -->|"assembles map"| node_mapmodel
node_worker -->|"requests map export"| node_export
node_export -->|"writes"| node_omapfile
node_export -->|"writes"| node_geotiff
node_inference -.->|"predicts streams"| node_hydrology

click node_controller "https://github.com/yvind/omapmaker/blob/main/src/app/controller.rs"
click node_worker "https://github.com/yvind/omapmaker/blob/main/src/app/worker.rs"
click node_ui "https://github.com/yvind/omapmaker/blob/main/src/app/ui/mod.rs"
click node_params "https://github.com/yvind/omapmaker/blob/main/src/parameters/mod.rs"
click node_lidar "https://github.com/yvind/omapmaker/blob/main/src/lidar/mod.rs"
click node_geometry "https://github.com/yvind/omapmaker/blob/main/src/geometry/mod.rs"
click node_pipeline "https://github.com/yvind/omapmaker/blob/main/src/generation/pipeline/mod.rs"
click node_terrain "https://github.com/yvind/omapmaker/blob/main/src/generation/features/contours/mod.rs"
click node_vegetation "https://github.com/yvind/omapmaker/blob/main/src/generation/features/vegetation/mod.rs"
click node_buildings "https://github.com/yvind/omapmaker/blob/main/src/generation/features/buildings/mod.rs"
click node_hydrology "https://github.com/yvind/omapmaker/blob/main/src/generation/features/streams/mod.rs"
click node_otherfeatures "https://github.com/yvind/omapmaker/blob/main/src/generation/features/mod.rs"
click node_raster "https://github.com/yvind/omapmaker/blob/main/src/raster/mod.rs"
click node_mapmodel "https://github.com/yvind/omapmaker/blob/main/src/map/mod.rs"
click node_export "https://github.com/yvind/omapmaker/blob/main/src/generation/export/mod.rs"
click node_inference "https://github.com/yvind/omapmaker/blob/main/src/inference/mod.rs"

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_controller,node_worker,node_ui,node_params toneBlue
class node_lidar,node_geometry toneAmber
class node_pipeline,node_terrain,node_vegetation,node_buildings,node_hydrology,node_otherfeatures,node_raster,node_inference toneMint
class node_mapmodel,node_export toneRose
class node_user,node_lidarfiles,node_basemap,node_omapfile,node_geotiff toneIndigo
```

## Components

### Desktop workflow

- [GUI controller](https://github.com/yvind/omapmaker/blob/main/src/app/controller.rs): `src/app/controller.rs`
- [Background worker](https://github.com/yvind/omapmaker/blob/main/src/app/worker.rs): `src/app/worker.rs`
- [Map interface](https://github.com/yvind/omapmaker/blob/main/src/app/ui/mod.rs): `src/app/ui/mod.rs`
- [Map parameters](https://github.com/yvind/omapmaker/blob/main/src/parameters/mod.rs): `src/parameters/mod.rs`

### LiDAR preparation

- [LiDAR operations](https://github.com/yvind/omapmaker/blob/main/src/lidar/mod.rs): `src/lidar/mod.rs`
- [Geometry and projection](https://github.com/yvind/omapmaker/blob/main/src/geometry/mod.rs): `src/geometry/mod.rs`

### Map generation

- [Tiled generation](https://github.com/yvind/omapmaker/blob/main/src/generation/pipeline/mod.rs): `src/generation/pipeline/mod.rs`
- [Terrain and contours](https://github.com/yvind/omapmaker/blob/main/src/generation/features/contours/mod.rs): `src/generation/features/contours/mod.rs`
- [Vegetation](https://github.com/yvind/omapmaker/blob/main/src/generation/features/vegetation/mod.rs): `src/generation/features/vegetation/mod.rs`
- [Buildings](https://github.com/yvind/omapmaker/blob/main/src/generation/features/buildings/mod.rs): `src/generation/features/buildings/mod.rs`
- [Water and streams](https://github.com/yvind/omapmaker/blob/main/src/generation/features/streams/mod.rs): `src/generation/features/streams/mod.rs`
- [Other features](https://github.com/yvind/omapmaker/blob/main/src/generation/features/mod.rs): `src/generation/features/mod.rs`
- [Raster processing](https://github.com/yvind/omapmaker/blob/main/src/raster/mod.rs): `src/raster/mod.rs`
- [Optional stream model](https://github.com/yvind/omapmaker/blob/main/src/inference/mod.rs): `src/inference/mod.rs`

### Map outputs

- [Map representation](https://github.com/yvind/omapmaker/blob/main/src/map/mod.rs): `src/map/mod.rs`
- [Map and raster export](https://github.com/yvind/omapmaker/blob/main/src/generation/export/mod.rs): `src/generation/export/mod.rs`

### Other components

- **Mapmaker**
- **LiDAR files**
- **Map tile services**
- **Omap output**
- **GeoTIFF output**

## Connections

- Mapmaker → Map interface: tunes and selects
- Map interface → GUI controller: dispatches actions
- GUI controller → Background worker: sends tasks
- Background worker → GUI controller: returns events
- GUI controller → Map parameters: updates parameters
- GUI controller → Map tile services: requests tiles
- Background worker → LiDAR operations: analyzes and converts
- LiDAR files → LiDAR operations: reads
- Background worker → Tiled generation: requests preview and generation
- Tiled generation → LiDAR operations: uses LiDAR data
- Tiled generation → Terrain and contours: derives contours
- Tiled generation → Vegetation: derives vegetation
- Tiled generation → Buildings: derives buildings
- Tiled generation → Water and streams: derives hydrology
- Tiled generation → Other features: derives features
- Tiled generation → Raster processing: processes rasters
- Tiled generation → Map representation: assembles map
- Background worker → Map and raster export: requests map export
- Map and raster export → Omap output: writes
- Map and raster export → GeoTIFF output: writes
- Optional stream model → Water and streams: predicts streams
