# gorniakgrzegorz/geoai_klasyfikator architecture

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

- Interactive diagram: https://gitdiagram.com/gorniakgrzegorz/geoai_klasyfikator
- Repository: https://github.com/gorniakgrzegorz/geoai_klasyfikator

## Overview

GeoAI Klasyfikator produces object-based land-cover maps from RGB UAV or satellite imagery, with optional surface-height data. The user supplies imagery and labelled examples; the application segments the image, measures object features, trains a Random Forest, classifies objects, optionally refines the map, and can assess accuracy using independent reference points. The repository offers QGIS plugins in Polish and English, a CLI, and a Windows GUI. The README documents the shared workflow and batch CLI/Windows capability; some implementation details are unsampled, so those links are omitted where not evidenced.

Main entry points: [`program_cli/geoai_cli/main.py`](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/main.py) (CLI commands), [`geoai_klasyfikator/dialogs/dock.py`](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/dialogs/dock.py) (Plugin workflow panel), [`GeoAI_Classification/dialogs/dock.py`](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/GeoAI_Classification/dialogs/dock.py) (English workflow panel), [`geoai_klasyfikator/core/slic.py`](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/slic.py) (SLIC segmentation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_qgis["QGIS plugins"]
  node_polish_plugin["Polish plugin<br/>[main_plugin.py]"]
  node_polish_panel["Plugin workflow panel<br/>[dock.py]"]
  node_map_tools["Map interaction tools<br/>[maptools.py]"]
  node_english_plugin["English plugin<br/>[main_plugin.py]"]
  node_english_panel["English workflow panel<br/>[dock.py]"]
end

subgraph group_cli["CLI and Windows"]
  node_cli_entry["CLI commands<br/>[main.py]"]
  node_windows_gui["Windows GUI<br/>[okno.py]"]
  node_batch_runner["Batch processing<br/>[przebieg.py]"]
  node_model_store["Model files<br/>[model.py]"]
  node_samples["Training samples<br/>[probki.py]"]
  node_cli_core["CLI core adapter<br/>[rdzen.py]"]
end

subgraph group_processing["Image processing"]
  node_cli_raster["Raster I/O<br/>[raster.py]"]
  node_qgis_raster["QGIS raster I/O<br/>[qgis_io.py]"]
  node_segmentation["SLIC segmentation<br/>[slic.py]"]
  node_features["Object features<br/>[features.py]"]
  node_deps["Optional engines<br/>[deps.py]"]
end

subgraph group_learning["Classification and assessment"]
  node_classifier["Random Forest<br/>[classifier.py]"]
  node_refinement["Map refinement<br/>[refine.py]"]
  node_accuracy["Accuracy assessment<br/>[accuracy.py]"]
end

node_user(("GIS analyst"))

node_user -->|"opens"| node_polish_plugin
node_user -->|"opens"| node_english_plugin
node_user -->|"runs commands"| node_cli_entry
node_user -->|"uses"| node_windows_gui
node_polish_plugin -->|"opens panel"| node_polish_panel
node_english_plugin -->|"opens panel"| node_english_panel
node_polish_panel -->|"uses"| node_map_tools
node_polish_panel -->|"uses"| node_qgis_raster
node_polish_panel -->|"uses"| node_segmentation
node_polish_panel -->|"measures objects"| node_features
node_polish_panel -->|"trains and classifies"| node_classifier
node_polish_panel -->|"refines map"| node_refinement
node_polish_panel -->|"assesses results"| node_accuracy
node_english_panel -->|"uses"| node_qgis_raster
node_english_panel -->|"uses"| node_segmentation
node_english_panel -->|"measures objects"| node_features
node_english_panel -->|"trains and classifies"| node_classifier
node_english_panel -->|"refines map"| node_refinement
node_english_panel -->|"assesses results"| node_accuracy
node_cli_entry -->|"uses raster I/O"| node_cli_raster
node_cli_entry -->|"dispatches batch"| node_batch_runner
node_cli_entry -->|"loads and saves"| node_model_store
node_cli_entry -->|"loads examples"| node_samples
node_cli_entry -->|"uses core"| node_cli_core
node_windows_gui -->|"invokes commands"| node_cli_entry
node_batch_runner -->|"reads and writes"| node_cli_raster
node_batch_runner -->|"uses"| node_cli_core
node_classifier -->|"selects engines"| node_deps
node_features -->|"uses optional filters"| node_deps
node_segmentation -.->|"selects engine"| node_deps
node_cli_entry -.->|"segments imagery"| node_segmentation
node_cli_entry -.->|"measures objects"| node_features
node_cli_entry -.->|"classifies objects"| node_classifier

click node_polish_plugin "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/main_plugin.py"
click node_polish_panel "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/dialogs/dock.py"
click node_map_tools "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/dialogs/maptools.py"
click node_english_plugin "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/GeoAI_Classification/main_plugin.py"
click node_english_panel "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/GeoAI_Classification/dialogs/dock.py"
click node_cli_entry "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/main.py"
click node_windows_gui "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_exe/okno.py"
click node_batch_runner "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/przebieg.py"
click node_cli_raster "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/raster.py"
click node_qgis_raster "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/qgis_io.py"
click node_segmentation "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/slic.py"
click node_features "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/features.py"
click node_classifier "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/classifier.py"
click node_refinement "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/refine.py"
click node_accuracy "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/accuracy.py"
click node_model_store "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/model.py"
click node_samples "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/probki.py"
click node_cli_core "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/rdzen.py"
click node_deps "https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/deps.py"

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_polish_plugin,node_polish_panel,node_map_tools,node_english_plugin,node_english_panel toneBlue
class node_cli_entry,node_windows_gui,node_batch_runner,node_model_store,node_samples,node_cli_core toneAmber
class node_cli_raster,node_qgis_raster,node_segmentation,node_features,node_deps toneMint
class node_classifier,node_refinement,node_accuracy toneRose
class node_user toneIndigo
```

## Components

### QGIS plugins

- [Polish plugin](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/main_plugin.py): `geoai_klasyfikator/main_plugin.py`
- [Plugin workflow panel](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/dialogs/dock.py): `geoai_klasyfikator/dialogs/dock.py`
- [Map interaction tools](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/dialogs/maptools.py): `geoai_klasyfikator/dialogs/maptools.py`
- [English plugin](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/GeoAI_Classification/main_plugin.py): `GeoAI_Classification/main_plugin.py`
- [English workflow panel](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/GeoAI_Classification/dialogs/dock.py): `GeoAI_Classification/dialogs/dock.py`

### CLI and Windows

- [CLI commands](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/main.py): `program_cli/geoai_cli/main.py`
- [Windows GUI](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_exe/okno.py): `program_exe/okno.py`
- [Batch processing](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/przebieg.py): `program_cli/geoai_cli/przebieg.py`
- [Model files](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/model.py): `program_cli/geoai_cli/model.py`
- [Training samples](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/probki.py): `program_cli/geoai_cli/probki.py`
- [CLI core adapter](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/rdzen.py): `program_cli/geoai_cli/rdzen.py`

### Image processing

- [Raster I/O](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/program_cli/geoai_cli/raster.py): `program_cli/geoai_cli/raster.py`
- [QGIS raster I/O](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/qgis_io.py): `geoai_klasyfikator/core/qgis_io.py`
- [SLIC segmentation](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/slic.py): `geoai_klasyfikator/core/slic.py`
- [Object features](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/features.py): `geoai_klasyfikator/core/features.py`
- [Optional engines](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/deps.py): `geoai_klasyfikator/core/deps.py`

### Classification and assessment

- [Random Forest](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/classifier.py): `geoai_klasyfikator/core/classifier.py`
- [Map refinement](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/refine.py): `geoai_klasyfikator/core/refine.py`
- [Accuracy assessment](https://github.com/gorniakgrzegorz/geoai_klasyfikator/blob/main/geoai_klasyfikator/core/accuracy.py): `geoai_klasyfikator/core/accuracy.py`

### Other components

- **GIS analyst**

## Connections

- GIS analyst → Polish plugin: opens (evidence: `README.md`)
- GIS analyst → English plugin: opens (evidence: `README.md`)
- GIS analyst → CLI commands: runs commands (evidence: `README.md`)
- GIS analyst → Windows GUI: uses (evidence: `README.md`)
- Polish plugin → Plugin workflow panel: opens panel (evidence: `geoai_klasyfikator/main_plugin.py`)
- English plugin → English workflow panel: opens panel (evidence: `GeoAI_Classification/main_plugin.py`)
- Plugin workflow panel → Map interaction tools: uses (evidence: `geoai_klasyfikator/dialogs/dock.py`)
- Plugin workflow panel → QGIS raster I/O: uses (evidence: `geoai_klasyfikator/dialogs/dock.py`)
- Plugin workflow panel → SLIC segmentation: uses (evidence: `geoai_klasyfikator/dialogs/dock.py`)
- Plugin workflow panel → Object features: measures objects (evidence: `geoai_klasyfikator/dialogs/dock.py`)
- Plugin workflow panel → Random Forest: trains and classifies (evidence: `geoai_klasyfikator/dialogs/dock.py`)
- Plugin workflow panel → Map refinement: refines map (evidence: `geoai_klasyfikator/dialogs/dock.py`)
- Plugin workflow panel → Accuracy assessment: assesses results (evidence: `geoai_klasyfikator/dialogs/dock.py`)
- English workflow panel → QGIS raster I/O: uses (evidence: `GeoAI_Classification/dialogs/dock.py`)
- English workflow panel → SLIC segmentation: uses (evidence: `GeoAI_Classification/dialogs/dock.py`)
- English workflow panel → Object features: measures objects (evidence: `GeoAI_Classification/dialogs/dock.py`)
- English workflow panel → Random Forest: trains and classifies (evidence: `GeoAI_Classification/dialogs/dock.py`)
- English workflow panel → Map refinement: refines map (evidence: `GeoAI_Classification/dialogs/dock.py`)
- English workflow panel → Accuracy assessment: assesses results (evidence: `GeoAI_Classification/dialogs/dock.py`)
- CLI commands → Raster I/O: uses raster I/O (evidence: `program_cli/geoai_cli/main.py`)
- CLI commands → Batch processing: dispatches batch (evidence: `program_cli/geoai_cli/main.py`)
- CLI commands → Model files: loads and saves (evidence: `program_cli/geoai_cli/main.py`)
- CLI commands → Training samples: loads examples (evidence: `program_cli/geoai_cli/main.py`)
- CLI commands → CLI core adapter: uses core (evidence: `program_cli/geoai_cli/main.py`)
- Windows GUI → CLI commands: invokes commands (evidence: `program_exe/okno.py`)
- Batch processing → Raster I/O: reads and writes (evidence: `program_cli/geoai_cli/przebieg.py`)
- Batch processing → CLI core adapter: uses (evidence: `program_cli/geoai_cli/przebieg.py`)
- Random Forest → Optional engines: selects engines (evidence: `geoai_klasyfikator/core/classifier.py`)
- Object features → Optional engines: uses optional filters (evidence: `geoai_klasyfikator/core/features.py`)
- SLIC segmentation → Optional engines: selects engine (evidence: `geoai_klasyfikator/core/slic.py`)
- CLI commands → SLIC segmentation: segments imagery
- CLI commands → Object features: measures objects
- CLI commands → Random Forest: classifies objects
