# district47/easyprop architecture

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

- Interactive diagram: https://gitdiagram.com/district47/easyprop
- Repository: https://github.com/district47/easyprop

## Overview

EasyProp combines a browser-based RF coverage viewer with the SPLAT! terrain and propagation engine. The main user workflow is map click and radio presets → HTTP compute request → terrain acquisition/conversion → SPLAT! coverage calculation → georeferenced image displayed on a basemap. The graph also preserves SPLAT!’s propagation model, legacy terrain inputs, and PNG/GeoTIFF outputs. Relationships among viewer, fetcher, and engine are based on the README’s documented workflow; unsampled implementation details are not inferred.

Main entry points: [`src/splat.cpp`](https://github.com/District47/EasyProp/blob/main/src/splat.cpp) (Coverage Engine), [`viewer/launch.ps1`](https://github.com/District47/EasyProp/blob/main/viewer/launch.ps1) (Compute Server), [`viewer/index.html`](https://github.com/District47/EasyProp/blob/main/viewer/index.html) (Map Interface), [`utils/fetch_srtm.ps1`](https://github.com/District47/EasyProp/blob/main/utils/fetch_srtm.ps1) (SRTM Fetcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_viewer["Interactive Viewer"]
  node_leaflet["Map Interface<br/>[index.html]"]
  node_server["Compute Server<br/>[launch.ps1]"]
  node_txparams["TX Parameters<br/>[launch.ps1]"]
end

subgraph group_terrain["Terrain Data"]
  node_terrainfetch["SRTM Fetcher<br/>[fetch_srtm.ps1]"]
  node_srtm[("SRTM Terrain")]
  node_srtmconvert["SRTM Converter<br/>[srtm2sdf.c]"]
  node_sdf[("SDF Terrain Tiles")]
  node_usgsconvert["USGS Converter<br/>[usgs2sdf.c]"]
end

subgraph group_engine["Propagation Engine"]
  node_splat["Coverage Engine<br/>[splat.cpp]"]
  node_itwom["ITWOM Model<br/>[itwom3.0.cpp]"]
  node_platform["Portability Shims<br/>[platform.cpp]"]
  node_font["Map Font Data<br/>[fontdata.h]"]
end

subgraph group_render["Map Rendering"]
  node_image["Image Buffer<br/>[Image.h]"]
  node_png["PNG Writer<br/>[PngWriter.cpp]"]
  node_geotiff["GeoTIFF Writer<br/>[GeoTiffWriter.cpp]"]
  node_coverage["Coverage Images"]
end

node_user(("Map User"))
node_basemap["OpenStreetMap"]
node_aws[("AWS SRTM Mirror")]

node_user -->|"sets transmitter"| node_leaflet
node_leaflet -->|"posts compute"| node_server
node_server -->|"writes inputs"| node_txparams
node_server -->|"requests missing tiles"| node_terrainfetch
node_terrainfetch -->|"fetches tiles"| node_aws
node_terrainfetch -->|"caches terrain"| node_srtm
node_srtmconvert -->|"converts terrain"| node_sdf
node_server -.->|"converts fetched data"| node_srtmconvert
node_usgsconvert -->|"converts DEM"| node_sdf
node_server -->|"runs engine"| node_splat
node_splat -->|"uses propagation model"| node_itwom
node_splat -->|"reads terrain"| node_sdf
node_splat -->|"reads radio inputs"| node_txparams
node_splat -->|"uses portability layer"| node_platform
node_splat -->|"uses map glyphs"| node_font
node_splat -->|"fills image buffer"| node_image
node_splat -->|"writes PNG"| node_png
node_splat -->|"writes GeoTIFF"| node_geotiff
node_png -->|"produces image"| node_coverage
node_geotiff -->|"produces image"| node_coverage
node_server -->|"serves result"| node_leaflet
node_leaflet -->|"overlays result"| node_coverage
node_leaflet -->|"displays basemap"| node_basemap

click node_leaflet "https://github.com/District47/EasyProp/blob/main/viewer/index.html"
click node_server "https://github.com/District47/EasyProp/blob/main/viewer/launch.ps1"
click node_txparams "https://github.com/District47/EasyProp/blob/main/viewer/launch.ps1"
click node_terrainfetch "https://github.com/District47/EasyProp/blob/main/utils/fetch_srtm.ps1"
click node_srtmconvert "https://github.com/District47/EasyProp/blob/main/utils/srtm2sdf.c"
click node_usgsconvert "https://github.com/District47/EasyProp/blob/main/utils/usgs2sdf.c"
click node_splat "https://github.com/District47/EasyProp/blob/main/src/splat.cpp"
click node_itwom "https://github.com/District47/EasyProp/blob/main/src/itwom3.0.cpp"
click node_platform "https://github.com/District47/EasyProp/blob/main/src/compat/platform.cpp"
click node_font "https://github.com/District47/EasyProp/blob/main/src/fontdata.h"
click node_image "https://github.com/District47/EasyProp/blob/main/src/render/Image.h"
click node_png "https://github.com/District47/EasyProp/blob/main/src/render/PngWriter.cpp"
click node_geotiff "https://github.com/District47/EasyProp/blob/main/src/render/GeoTiffWriter.cpp"

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_leaflet,node_server,node_txparams,node_user toneBlue
class node_terrainfetch,node_srtm,node_srtmconvert,node_sdf,node_usgsconvert,node_aws toneAmber
class node_splat,node_itwom,node_platform,node_font toneMint
class node_image,node_png,node_geotiff,node_coverage toneRose
class node_basemap toneIndigo
```

## Components

### Interactive Viewer

- [Map Interface](https://github.com/District47/EasyProp/blob/main/viewer/index.html): `viewer/index.html`
- [Compute Server](https://github.com/District47/EasyProp/blob/main/viewer/launch.ps1): `viewer/launch.ps1`
- [TX Parameters](https://github.com/District47/EasyProp/blob/main/viewer/launch.ps1): `viewer/launch.ps1`

### Terrain Data

- [SRTM Fetcher](https://github.com/District47/EasyProp/blob/main/utils/fetch_srtm.ps1): `utils/fetch_srtm.ps1`
- **SRTM Terrain**
- [SRTM Converter](https://github.com/District47/EasyProp/blob/main/utils/srtm2sdf.c): `utils/srtm2sdf.c`
- **SDF Terrain Tiles**
- [USGS Converter](https://github.com/District47/EasyProp/blob/main/utils/usgs2sdf.c): `utils/usgs2sdf.c`

### Propagation Engine

- [Coverage Engine](https://github.com/District47/EasyProp/blob/main/src/splat.cpp): `src/splat.cpp`
- [ITWOM Model](https://github.com/District47/EasyProp/blob/main/src/itwom3.0.cpp): `src/itwom3.0.cpp`
- [Portability Shims](https://github.com/District47/EasyProp/blob/main/src/compat/platform.cpp): `src/compat/platform.cpp`
- [Map Font Data](https://github.com/District47/EasyProp/blob/main/src/fontdata.h): `src/fontdata.h`

### Map Rendering

- [Image Buffer](https://github.com/District47/EasyProp/blob/main/src/render/Image.h): `src/render/Image.h`
- [PNG Writer](https://github.com/District47/EasyProp/blob/main/src/render/PngWriter.cpp): `src/render/PngWriter.cpp`
- [GeoTIFF Writer](https://github.com/District47/EasyProp/blob/main/src/render/GeoTiffWriter.cpp): `src/render/GeoTiffWriter.cpp`
- **Coverage Images**

### Other components

- **Map User**
- **OpenStreetMap**
- **AWS SRTM Mirror**

## Connections

- Map User → Map Interface: sets transmitter (evidence: `README.md`)
- Map Interface → Compute Server: posts compute (evidence: `README.md`)
- Compute Server → TX Parameters: writes inputs (evidence: `README.md`)
- Compute Server → SRTM Fetcher: requests missing tiles (evidence: `README.md`)
- SRTM Fetcher → AWS SRTM Mirror: fetches tiles (evidence: `README.md`)
- SRTM Fetcher → SRTM Terrain: caches terrain (evidence: `README.md`)
- SRTM Converter → SDF Terrain Tiles: converts terrain (evidence: `README.md`)
- Compute Server → SRTM Converter: converts fetched data
- USGS Converter → SDF Terrain Tiles: converts DEM (evidence: `README.md`)
- Compute Server → Coverage Engine: runs engine (evidence: `README.md`)
- Coverage Engine → ITWOM Model: uses propagation model (evidence: `README.md`)
- Coverage Engine → SDF Terrain Tiles: reads terrain (evidence: `README.md`)
- Coverage Engine → TX Parameters: reads radio inputs (evidence: `README.md`)
- Coverage Engine → Portability Shims: uses portability layer (evidence: `src/splat.cpp`)
- Coverage Engine → Map Font Data: uses map glyphs (evidence: `src/splat.cpp`)
- Coverage Engine → Image Buffer: fills image buffer (evidence: `src/splat.cpp`)
- Coverage Engine → PNG Writer: writes PNG (evidence: `README.md`)
- Coverage Engine → GeoTIFF Writer: writes GeoTIFF (evidence: `README.md`)
- PNG Writer → Coverage Images: produces image (evidence: `README.md`)
- GeoTIFF Writer → Coverage Images: produces image (evidence: `README.md`)
- Compute Server → Map Interface: serves result (evidence: `README.md`)
- Map Interface → Coverage Images: overlays result (evidence: `README.md`)
- Map Interface → OpenStreetMap: displays basemap (evidence: `README.md`)
