# davidfrantz/force architecture

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

- Interactive diagram: https://gitdiagram.com/davidfrantz/force
- Repository: https://github.com/davidfrantz/force

## Overview

FORCE is an Earth-observation processing engine that turns satellite imagery and other environmental data into analysis-ready data and information products. The documented workflow runs from imagery through data-cube processing to ARD, then supports large-area and time-series analysis. The tree and source index identify lower-level correction, higher-level task dispatch, and shared raster/cube infrastructure. Several feature modules are documented by their inclusion in the task interface, but their internal calls were not sampled; those links are therefore not asserted.

Main entry points: [`src/modules/higher-level/tasks-hl.h`](https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/tasks-hl.h) (Task interface), [`src/main/higher-level/force-higher-level.c`](https://github.com/davidfrantz/force/blob/main/src/main/higher-level/force-higher-level.c) (Higher-level runner), [`src/modules/cross-level/cube-cl.c`](https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/cube-cl.c) (Data cube), [`src/main/lower-level/force-cube-init.c`](https://github.com/davidfrantz/force/blob/main/src/main/lower-level/force-cube-init.c) (Cube initialization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Inputs and setup"]
  node_supported["Supported imagery"]
  node_otherdata["Other data sources"]
  node_cubeinit["Cube initialization<br/>[force-cube-init.c]"]
end

subgraph group_correction["Correction and ARD"]
  node_l2ps["Level-2 processing<br/>[force-l2ps.c]"]
  node_lower["Sensor correction"]
  node_ardread["ARD reading<br/>[read-ard-hl.c]"]
end

subgraph group_analysis["Analysis products"]
  node_dispatch["Higher-level runner"]
  node_tasks["Task interface<br/>[tasks-hl.h]"]
  node_composite["Compositing"]
  node_time_series["Time-series analysis"]
  node_machine_learning["Machine learning<br/>[ml-hl.c]"]
  node_sampling["Sampling<br/>[sample-hl.c]"]
  node_udf["User functions<br/>[udf-hl.c]"]
end

subgraph group_core["Shared processing core"]
  node_cube[("Data cube<br/>[cube-cl.c]")]
  node_brick["Raster bricks<br/>[brick_base-cl.c]"]
  node_brickio["Raster I/O<br/>[brick_io-cl.cpp]"]
  node_qai["Quality assurance<br/>[quality-cl.h]"]
end

node_analyst(("Analyst"))
node_products["Information products"]

node_analyst -->|"provides imagery"| node_supported
node_analyst -->|"provides data"| node_otherdata
node_supported -.->|"processed in cube"| node_cubeinit
node_otherdata -.->|"processed in cube"| node_cubeinit
node_cubeinit -->|"initializes"| node_cube
node_supported -.->|"radiometrically corrected"| node_l2ps
node_l2ps -->|"uses correction modules"| node_lower
node_cube -.->|"organizes archive"| node_ardread
node_ardread -->|"reads raster data"| node_brick
node_brickio -->|"reads and writes"| node_brick
node_dispatch -->|"uses task interface"| node_tasks
node_tasks -->|"declares read stage"| node_ardread
node_tasks -->|"exposes task modules"| node_composite
node_tasks -->|"exposes task modules"| node_time_series
node_tasks -->|"exposes task modules"| node_machine_learning
node_tasks -->|"exposes task modules"| node_sampling
node_tasks -->|"exposes task modules"| node_udf
node_analyst -.->|"requests analysis"| node_dispatch
node_dispatch -.->|"generates information"| node_products
node_cube -->|"supports large-area analysis"| node_products

click node_cubeinit "https://github.com/davidfrantz/force/blob/main/src/main/lower-level/force-cube-init.c"
click node_cube "https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/cube-cl.c"
click node_l2ps "https://github.com/davidfrantz/force/blob/main/src/main/lower-level/force-l2ps.c"
click node_lower "https://github.com/davidfrantz/force/tree/main/src/modules/lower-level"
click node_ardread "https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/read-ard-hl.c"
click node_brick "https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/brick_base-cl.c"
click node_brickio "https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/brick_io-cl.cpp"
click node_qai "https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/quality-cl.h"
click node_dispatch "https://github.com/davidfrantz/force/blob/main/src/main/higher-level/force-higher-level.c"
click node_tasks "https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/tasks-hl.h"
click node_composite "https://github.com/davidfrantz/force/tree/main/src/modules/higher-level"
click node_time_series "https://github.com/davidfrantz/force/tree/main/src/modules/higher-level"
click node_machine_learning "https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/ml-hl.c"
click node_sampling "https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/sample-hl.c"
click node_udf "https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/udf-hl.c"

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_supported,node_otherdata,node_cubeinit toneBlue
class node_l2ps,node_lower,node_ardread toneAmber
class node_dispatch,node_tasks,node_composite,node_time_series,node_machine_learning,node_sampling,node_udf toneMint
class node_cube,node_brick,node_brickio,node_qai toneRose
class node_analyst,node_products toneIndigo
```

## Components

### Inputs and setup

- **Supported imagery**
- **Other data sources**
- [Cube initialization](https://github.com/davidfrantz/force/blob/main/src/main/lower-level/force-cube-init.c): `src/main/lower-level/force-cube-init.c`

### Correction and ARD

- [Level-2 processing](https://github.com/davidfrantz/force/blob/main/src/main/lower-level/force-l2ps.c): `src/main/lower-level/force-l2ps.c`
- [Sensor correction](https://github.com/davidfrantz/force/tree/main/src/modules/lower-level): `src/modules/lower-level`
- [ARD reading](https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/read-ard-hl.c): `src/modules/higher-level/read-ard-hl.c`

### Analysis products

- [Higher-level runner](https://github.com/davidfrantz/force/blob/main/src/main/higher-level/force-higher-level.c): `src/main/higher-level/force-higher-level.c`
- [Task interface](https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/tasks-hl.h): `src/modules/higher-level/tasks-hl.h`
- [Compositing](https://github.com/davidfrantz/force/tree/main/src/modules/higher-level): `src/modules/higher-level`
- [Time-series analysis](https://github.com/davidfrantz/force/tree/main/src/modules/higher-level): `src/modules/higher-level`
- [Machine learning](https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/ml-hl.c): `src/modules/higher-level/ml-hl.c`
- [Sampling](https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/sample-hl.c): `src/modules/higher-level/sample-hl.c`
- [User functions](https://github.com/davidfrantz/force/blob/main/src/modules/higher-level/udf-hl.c): `src/modules/higher-level/udf-hl.c`

### Shared processing core

- [Data cube](https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/cube-cl.c): `src/modules/cross-level/cube-cl.c`
- [Raster bricks](https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/brick_base-cl.c): `src/modules/cross-level/brick_base-cl.c`
- [Raster I/O](https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/brick_io-cl.cpp): `src/modules/cross-level/brick_io-cl.cpp`
- [Quality assurance](https://github.com/davidfrantz/force/blob/main/src/modules/cross-level/quality-cl.h): `src/modules/cross-level/quality-cl.h`

### Other components

- **Analyst**
- **Information products**

## Connections

- Analyst → Supported imagery: provides imagery
- Analyst → Other data sources: provides data
- Supported imagery → Cube initialization: processed in cube
- Other data sources → Cube initialization: processed in cube
- Cube initialization → Data cube: initializes (evidence: `src/main/lower-level/force-cube-init.c`)
- Supported imagery → Level-2 processing: radiometrically corrected
- Level-2 processing → Sensor correction: uses correction modules (evidence: `src/main/lower-level/force-l2ps.c`)
- Data cube → ARD reading: organizes archive
- ARD reading → Raster bricks: reads raster data
- Raster I/O → Raster bricks: reads and writes
- Higher-level runner → Task interface: uses task interface (evidence: `src/main/higher-level/force-higher-level.c`)
- Task interface → ARD reading: declares read stage (evidence: `src/modules/higher-level/tasks-hl.h`)
- Task interface → Compositing: exposes task modules (evidence: `src/modules/higher-level/tasks-hl.h`)
- Task interface → Time-series analysis: exposes task modules (evidence: `src/modules/higher-level/tasks-hl.h`)
- Task interface → Machine learning: exposes task modules (evidence: `src/modules/higher-level/tasks-hl.h`)
- Task interface → Sampling: exposes task modules (evidence: `src/modules/higher-level/tasks-hl.h`)
- Task interface → User functions: exposes task modules (evidence: `src/modules/higher-level/tasks-hl.h`)
- Analyst → Higher-level runner: requests analysis
- Higher-level runner → Information products: generates information
- Data cube → Information products: supports large-area analysis
