# brenykurien/bhuvanlulc architecture

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

- Interactive diagram: https://gitdiagram.com/brenykurien/bhuvanlulc
- Repository: https://github.com/brenykurien/bhuvanlulc

## Overview

BhuvanLULC is a single QGIS script that turns a selected Bhuvan land-cover raster into a vector layer for one chosen class. It combines raster bands, prompts for a class code, isolates that value, polygonizes it, removes background features, dissolves the result, labels it, and adds it to the QGIS project. The graph reflects the behavior shown in the sole source file; no separate modules or storage services are present.

Main entry points: [`py_script_rtov.py`](https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py) (Extraction script)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_operator(("QGIS operator"))
node_source_raster["Active raster"]
node_script["Extraction script<br/>[py_script_rtov.py]"]
node_raster_calc["Raster calculation<br/>[py_script_rtov.py]"]
node_class_choice["Class selection<br/>[py_script_rtov.py]"]
node_class_mask["Class raster mask<br/>[py_script_rtov.py]"]
node_vector_processing["Vector processing<br/>[py_script_rtov.py]"]
node_class_vector["Class vector layer<br/>[py_script_rtov.py]"]
node_qgis_project["QGIS project"]

node_source_raster -->|"provides active layer"| node_script
node_script -->|"calculates bands"| node_raster_calc
node_script -->|"prompts for code"| node_class_choice
node_class_choice -->|"returns code"| node_script
node_script -->|"isolates class"| node_class_mask
node_script -->|"polygonizes and dissolves"| node_vector_processing
node_vector_processing -->|"writes shapefile"| node_class_vector
node_script -->|"adds layer"| node_qgis_project
node_operator -->|"enters code"| node_class_choice
node_class_vector -->|"becomes project layer"| node_qgis_project

click node_script "https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py"
click node_raster_calc "https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py"
click node_class_choice "https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py"
click node_class_mask "https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py"
click node_vector_processing "https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py"
click node_class_vector "https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.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_operator,node_source_raster,node_qgis_project toneIndigo
class node_script,node_raster_calc,node_class_choice,node_class_mask,node_vector_processing,node_class_vector toneTeal
```

## Components

### Other components

- **QGIS operator**
- **Active raster**
- [Extraction script](https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py): `py_script_rtov.py`
- [Raster calculation](https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py): `py_script_rtov.py`
- [Class selection](https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py): `py_script_rtov.py`
- [Class raster mask](https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py): `py_script_rtov.py`
- [Vector processing](https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py): `py_script_rtov.py`
- [Class vector layer](https://github.com/brenykurien/bhuvanlulc/blob/master/py_script_rtov.py): `py_script_rtov.py`
- **QGIS project**

## Connections

- Active raster → Extraction script: provides active layer (evidence: `py_script_rtov.py`)
- Extraction script → Raster calculation: calculates bands (evidence: `py_script_rtov.py`)
- Extraction script → Class selection: prompts for code (evidence: `py_script_rtov.py`)
- Class selection → Extraction script: returns code (evidence: `py_script_rtov.py`)
- Extraction script → Class raster mask: isolates class (evidence: `py_script_rtov.py`)
- Extraction script → Vector processing: polygonizes and dissolves (evidence: `py_script_rtov.py`)
- Vector processing → Class vector layer: writes shapefile (evidence: `py_script_rtov.py`)
- Extraction script → QGIS project: adds layer (evidence: `py_script_rtov.py`)
- QGIS operator → Class selection: enters code (evidence: `py_script_rtov.py`)
- Class vector layer → QGIS project: becomes project layer (evidence: `py_script_rtov.py`)
