# elvatro-0/qutils architecture

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

- Interactive diagram: https://gitdiagram.com/elvatro-0/qutils
- Repository: https://github.com/elvatro-0/qutils

## Overview

QUtils is a pyQGIS framework for fluent, type-aware processing of map layers. A user supplies layer pointer strings and QGIS processing context/feedback; vector or raster wrappers run and chain algorithms, expose outputs as layer wrappers, and can register results for loading. Feature cursors provide a separate layer-editing workflow. Console helpers add feedback widgets and completion-time layer loading. The README documents these capabilities; several internal modules were not sampled, so their relationships are shown only where documented or indexed.

Main entry points: [`QUtils/Processing.py`](https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py) (Vector processing), [`QUtils/Console.py`](https://github.com/elvatro-0/qutils/blob/main/QUtils/Console.py) (Console context), [`QUtils/Widgets.py`](https://github.com/elvatro-0/qutils/blob/main/QUtils/Widgets.py) (Feedback widget), [`QUtils/Legacy.py`](https://github.com/elvatro-0/qutils/blob/main/QUtils/Legacy.py) (Legacy utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Layer processing"]
  node_layer_proxy["Layer proxy<br/>[Processing.py]"]
  node_vector["Vector processing<br/>[Processing.py]"]
  node_raster["Raster processing<br/>[Processing.py]"]
  node_algorithm_run["Algorithm runner<br/>[Processing.py]"]
  node_load_result["Completion layer loading<br/>[Console.py]"]
  node_script_generator["Algorithm script generator"]
end

subgraph group_features["Feature editing"]
  node_feature_cursor["Feature cursor<br/>[Processing.py]"]
  node_connected_feature["Connected feature<br/>[Processing.py]"]
end

subgraph group_console["Console experience"]
  node_console_context["Console context<br/>[Console.py]"]
  node_feedback["Feedback<br/>[Console.py]"]
  node_feedback_widget["Feedback widget<br/>[Widgets.py]"]
end

subgraph group_support["Framework support"]
  node_qvariant["QVariant conversion hook<br/>[QVariantHook.py]"]
  node_error_handling["Error handling<br/>[ErrorHandling.py]"]
  node_legacy["Legacy utilities<br/>[Legacy.py]"]
  node_experimental["Experimental algorithms<br/>[Experimental.py]"]
  node_storage["Shared utility types<br/>[Storage.py]"]
end

node_user(("QGIS script user"))
node_qgis{{"QGIS Processing"}}

node_user -->|"creates context"| node_console_context
node_user -->|"supplies layer"| node_vector
node_user -->|"supplies layer"| node_raster
node_console_context -->|"creates feedback"| node_feedback
node_console_context -->|"creates widget"| node_feedback_widget
node_feedback -->|"emits messages"| node_feedback_widget
node_vector -->|"runs algorithms"| node_algorithm_run
node_raster -->|"runs algorithms"| node_algorithm_run
node_algorithm_run -->|"calls processing"| node_qgis
node_algorithm_run -->|"returns layer wrapper"| node_layer_proxy
node_layer_proxy -->|"converts parameters"| node_qvariant
node_vector -->|"provides features"| node_feature_cursor
node_feature_cursor -->|"wraps returned features"| node_connected_feature
node_user -->|"generates algorithm script"| node_script_generator
node_feedback -->|"signals completion"| node_load_result
node_load_result -->|"adds result layers"| node_qgis
node_vector -->|"uses error handling"| node_error_handling
node_legacy -->|"uses error handling"| node_error_handling
node_legacy -->|"uses processing wrappers"| node_vector
node_experimental -->|"uses processing wrappers"| node_vector
node_feedback_widget -->|"uses shared utilities"| node_storage
node_qvariant -->|"references utilities"| node_storage

click node_layer_proxy "https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py"
click node_vector "https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py"
click node_raster "https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py"
click node_algorithm_run "https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py"
click node_load_result "https://github.com/elvatro-0/qutils/blob/main/QUtils/Console.py"
click node_feature_cursor "https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py"
click node_connected_feature "https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py"
click node_console_context "https://github.com/elvatro-0/qutils/blob/main/QUtils/Console.py"
click node_feedback "https://github.com/elvatro-0/qutils/blob/main/QUtils/Console.py"
click node_feedback_widget "https://github.com/elvatro-0/qutils/blob/main/QUtils/Widgets.py"
click node_script_generator "https://github.com/elvatro-0/qutils/blob/main/QUtils/ProcessingAlgorithms.py"
click node_qvariant "https://github.com/elvatro-0/qutils/blob/main/QUtils/QVariantHook.py"
click node_error_handling "https://github.com/elvatro-0/qutils/blob/main/QUtils/ErrorHandling.py"
click node_legacy "https://github.com/elvatro-0/qutils/blob/main/QUtils/Legacy.py"
click node_experimental "https://github.com/elvatro-0/qutils/blob/main/QUtils/Experimental.py"
click node_storage "https://github.com/elvatro-0/qutils/blob/main/QUtils/Storage.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_layer_proxy,node_vector,node_raster,node_algorithm_run,node_load_result,node_script_generator,node_user toneBlue
class node_feature_cursor,node_connected_feature toneAmber
class node_console_context,node_feedback,node_feedback_widget toneMint
class node_qvariant,node_error_handling,node_legacy,node_experimental,node_storage toneRose
class node_qgis toneIndigo
```

## Components

### Layer processing

- [Layer proxy](https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py): `QUtils/Processing.py`
- [Vector processing](https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py): `QUtils/Processing.py`
- [Raster processing](https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py): `QUtils/Processing.py`
- [Algorithm runner](https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py): `QUtils/Processing.py`
- [Completion layer loading](https://github.com/elvatro-0/qutils/blob/main/QUtils/Console.py): `QUtils/Console.py`
- [Algorithm script generator](https://github.com/elvatro-0/qutils/blob/main/QUtils/ProcessingAlgorithms.py): `QUtils/ProcessingAlgorithms.py`

### Feature editing

- [Feature cursor](https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py): `QUtils/Processing.py`
- [Connected feature](https://github.com/elvatro-0/qutils/blob/main/QUtils/Processing.py): `QUtils/Processing.py`

### Console experience

- [Console context](https://github.com/elvatro-0/qutils/blob/main/QUtils/Console.py): `QUtils/Console.py`
- [Feedback](https://github.com/elvatro-0/qutils/blob/main/QUtils/Console.py): `QUtils/Console.py`
- [Feedback widget](https://github.com/elvatro-0/qutils/blob/main/QUtils/Widgets.py): `QUtils/Widgets.py`

### Framework support

- [QVariant conversion hook](https://github.com/elvatro-0/qutils/blob/main/QUtils/QVariantHook.py): `QUtils/QVariantHook.py`
- [Error handling](https://github.com/elvatro-0/qutils/blob/main/QUtils/ErrorHandling.py): `QUtils/ErrorHandling.py`
- [Legacy utilities](https://github.com/elvatro-0/qutils/blob/main/QUtils/Legacy.py): `QUtils/Legacy.py`
- [Experimental algorithms](https://github.com/elvatro-0/qutils/blob/main/QUtils/Experimental.py): `QUtils/Experimental.py`
- [Shared utility types](https://github.com/elvatro-0/qutils/blob/main/QUtils/Storage.py): `QUtils/Storage.py`

### Other components

- **QGIS script user**
- **QGIS Processing**

## Connections

- QGIS script user → Console context: creates context (evidence: `README.md`)
- QGIS script user → Vector processing: supplies layer (evidence: `README.md`)
- QGIS script user → Raster processing: supplies layer (evidence: `README.md`)
- Console context → Feedback: creates feedback (evidence: `QUtils/Console.py`)
- Console context → Feedback widget: creates widget (evidence: `QUtils/Console.py`)
- Feedback → Feedback widget: emits messages (evidence: `QUtils/Console.py`)
- Vector processing → Algorithm runner: runs algorithms (evidence: `README.md`)
- Raster processing → Algorithm runner: runs algorithms (evidence: `README.md`)
- Algorithm runner → QGIS Processing: calls processing (evidence: `README.md`)
- Algorithm runner → Layer proxy: returns layer wrapper (evidence: `README.md`)
- Layer proxy → QVariant conversion hook: converts parameters (evidence: `QUtils/Processing.py`)
- Vector processing → Feature cursor: provides features (evidence: `README.md`)
- Feature cursor → Connected feature: wraps returned features (evidence: `README.md`)
- QGIS script user → Algorithm script generator: generates algorithm script (evidence: `QUtils/ProcessingAlgorithms.py`)
- Feedback → Completion layer loading: signals completion (evidence: `QUtils/Console.py`)
- Completion layer loading → QGIS Processing: adds result layers (evidence: `QUtils/Console.py`)
- Vector processing → Error handling: uses error handling (evidence: `QUtils/Processing.py`)
- Legacy utilities → Error handling: uses error handling (evidence: `QUtils/Legacy.py`)
- Legacy utilities → Vector processing: uses processing wrappers (evidence: `QUtils/Legacy.py`)
- Experimental algorithms → Vector processing: uses processing wrappers (evidence: `QUtils/Experimental.py`)
- Feedback widget → Shared utility types: uses shared utilities (evidence: `QUtils/Widgets.py`)
- QVariant conversion hook → Shared utility types: references utilities (evidence: `QUtils/QVariantHook.py`)
