# ahzastudio/plantation-tools-free architecture

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

- Interactive diagram: https://gitdiagram.com/ahzastudio/plantation-tools-free
- Repository: https://github.com/ahzastudio/plantation-tools-free

## Overview

Plantation Tools is a QGIS Processing plugin for oil-palm plantation spatial analysis. The user opens the plugin or QGIS Processing Toolbox, supplies spatial inputs to a registered algorithm, and receives generated layers or analysis outputs. The graph preserves the documented free mapping utilities and major advanced branches, including AI, hydrology, infrastructure, and drone planning. Some algorithm links rely on the provider’s registration/import references in the SOURCE INDEX; unsampled implementation details are not inferred.

Main entry points: [`plantation_provider.py`](https://github.com/ahzastudio/plantation-tools-free/blob/main/plantation_provider.py) (Processing Provider), [`plantation_tools_plugin.py`](https://github.com/ahzastudio/plantation-tools-free/blob/main/plantation_tools_plugin.py) (Plugin UI), [`license_guard.py`](https://github.com/ahzastudio/plantation-tools-free/blob/main/license_guard.py) (License Check), [`algorithms/base_algorithm.py`](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/base_algorithm.py) (Algorithm Base)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["QGIS Entry"]
  node_plugin["Plugin UI"]
  node_provider["Processing Provider"]
  node_base["Algorithm Base<br/>[base_algorithm.py]"]
end

subgraph group_land["Land and Planting"]
  node_block_grid["Block Grid"]
  node_boundary["Contour Mapping<br/>[create_kontur.py]"]
  node_slope["Slope Classification<br/>[create_lereng.py]"]
  node_morphology["Morphology Mapping"]
  node_planting["Planting Points"]
  node_planting_tools["Planting Utilities"]
  node_fertilizer["Fertilizer Calculator"]
  node_geojson["GeoJSON Export<br/>[export_geojson.py]"]
end

subgraph group_analysis["Analysis"]
  node_hydrology["Hydrology Analysis"]
  node_sink["Sink Detection<br/>[sink_detection.py]"]
  node_palm_ai["Palm Detection"]
  node_clearing_ai["Land Clearing Detection"]
  node_infrastructure["Road Analysis"]
  node_drone["Drone Mission Planner"]
  node_flood["Flood Prediction"]
  node_vegetation["Vegetation Analysis"]
end

subgraph group_services["Access Services"]
  node_license_ui["License Dashboard<br/>[license_guard.py]"]
  node_license_check["License Check<br/>[license_guard.py]"]
  node_license_service[("Supabase License Service")]
end

node_qgis_user(("QGIS User"))

node_qgis_user -->|"opens"| node_plugin
node_plugin -->|"registers"| node_provider
node_plugin -->|"opens"| node_license_ui
node_provider -->|"registers"| node_block_grid
node_provider -->|"registers"| node_boundary
node_provider -->|"registers"| node_slope
node_provider -->|"registers"| node_morphology
node_provider -->|"registers"| node_planting
node_provider -->|"registers"| node_planting_tools
node_provider -->|"registers"| node_fertilizer
node_provider -->|"registers"| node_geojson
node_provider -->|"registers"| node_hydrology
node_provider -->|"registers"| node_sink
node_provider -->|"registers"| node_palm_ai
node_provider -->|"registers"| node_clearing_ai
node_provider -->|"registers"| node_infrastructure
node_provider -->|"registers"| node_drone
node_provider -->|"registers"| node_flood
node_provider -->|"registers"| node_vegetation
node_base -->|"checks access"| node_license_check
node_license_check -->|"requests license"| node_license_service
node_license_check -->|"shows status"| node_license_ui

click node_plugin "https://github.com/ahzastudio/plantation-tools-free/blob/main/plantation_tools_plugin.py"
click node_provider "https://github.com/ahzastudio/plantation-tools-free/blob/main/plantation_provider.py"
click node_base "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/base_algorithm.py"
click node_license_ui "https://github.com/ahzastudio/plantation-tools-free/blob/main/license_guard.py"
click node_license_check "https://github.com/ahzastudio/plantation-tools-free/blob/main/license_guard.py"
click node_block_grid "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_block_grid.py"
click node_boundary "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_kontur.py"
click node_slope "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_lereng.py"
click node_morphology "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_morfologi.py"
click node_planting "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/generate_planting_points.py"
click node_planting_tools "https://github.com/ahzastudio/plantation-tools-free/tree/main/algorithms"
click node_fertilizer "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/fertilizer_calculator.py"
click node_geojson "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/export_geojson.py"
click node_hydrology "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/hydrology_analysis.py"
click node_sink "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/sink_detection.py"
click node_palm_ai "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/oil_palm_detection.py"
click node_clearing_ai "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/land_clearing_detection.py"
click node_infrastructure "https://github.com/ahzastudio/plantation-tools-free/tree/main/algorithms"
click node_drone "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/drone_mission_planner.py"
click node_flood "https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/flood_prediction_analysis.py"
click node_vegetation "https://github.com/ahzastudio/plantation-tools-free/tree/main/algorithms"

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_plugin,node_provider,node_base,node_qgis_user toneBlue
class node_block_grid,node_boundary,node_slope,node_morphology,node_planting,node_planting_tools,node_fertilizer,node_geojson toneAmber
class node_hydrology,node_sink,node_palm_ai,node_clearing_ai,node_infrastructure,node_drone,node_flood,node_vegetation toneMint
class node_license_ui,node_license_check,node_license_service toneRose
```

## Components

### QGIS Entry

- [Plugin UI](https://github.com/ahzastudio/plantation-tools-free/blob/main/plantation_tools_plugin.py): `plantation_tools_plugin.py`
- [Processing Provider](https://github.com/ahzastudio/plantation-tools-free/blob/main/plantation_provider.py): `plantation_provider.py`
- [Algorithm Base](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/base_algorithm.py): `algorithms/base_algorithm.py`

### Land and Planting

- [Block Grid](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_block_grid.py): `algorithms/create_block_grid.py`
- [Contour Mapping](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_kontur.py): `algorithms/create_kontur.py`
- [Slope Classification](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_lereng.py): `algorithms/create_lereng.py`
- [Morphology Mapping](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/create_morfologi.py): `algorithms/create_morfologi.py`
- [Planting Points](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/generate_planting_points.py): `algorithms/generate_planting_points.py`
- [Planting Utilities](https://github.com/ahzastudio/plantation-tools-free/tree/main/algorithms): `algorithms`
- [Fertilizer Calculator](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/fertilizer_calculator.py): `algorithms/fertilizer_calculator.py`
- [GeoJSON Export](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/export_geojson.py): `algorithms/export_geojson.py`

### Analysis

- [Hydrology Analysis](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/hydrology_analysis.py): `algorithms/hydrology_analysis.py`
- [Sink Detection](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/sink_detection.py): `algorithms/sink_detection.py`
- [Palm Detection](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/oil_palm_detection.py): `algorithms/oil_palm_detection.py`
- [Land Clearing Detection](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/land_clearing_detection.py): `algorithms/land_clearing_detection.py`
- [Road Analysis](https://github.com/ahzastudio/plantation-tools-free/tree/main/algorithms): `algorithms`
- [Drone Mission Planner](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/drone_mission_planner.py): `algorithms/drone_mission_planner.py`
- [Flood Prediction](https://github.com/ahzastudio/plantation-tools-free/blob/main/algorithms/flood_prediction_analysis.py): `algorithms/flood_prediction_analysis.py`
- [Vegetation Analysis](https://github.com/ahzastudio/plantation-tools-free/tree/main/algorithms): `algorithms`

### Access Services

- [License Dashboard](https://github.com/ahzastudio/plantation-tools-free/blob/main/license_guard.py): `license_guard.py`
- [License Check](https://github.com/ahzastudio/plantation-tools-free/blob/main/license_guard.py): `license_guard.py`
- **Supabase License Service**

### Other components

- **QGIS User**

## Connections

- QGIS User → Plugin UI: opens (evidence: `plantation_tools_plugin.py`)
- Plugin UI → Processing Provider: registers (evidence: `plantation_tools_plugin.py`)
- Plugin UI → License Dashboard: opens (evidence: `plantation_tools_plugin.py`)
- Processing Provider → Block Grid: registers (evidence: `plantation_provider.py`)
- Processing Provider → Contour Mapping: registers (evidence: `plantation_provider.py`)
- Processing Provider → Slope Classification: registers (evidence: `plantation_provider.py`)
- Processing Provider → Morphology Mapping: registers (evidence: `plantation_provider.py`)
- Processing Provider → Planting Points: registers (evidence: `plantation_provider.py`)
- Processing Provider → Planting Utilities: registers (evidence: `plantation_provider.py`)
- Processing Provider → Fertilizer Calculator: registers (evidence: `plantation_provider.py`)
- Processing Provider → GeoJSON Export: registers (evidence: `plantation_provider.py`)
- Processing Provider → Hydrology Analysis: registers (evidence: `plantation_provider.py`)
- Processing Provider → Sink Detection: registers (evidence: `plantation_provider.py`)
- Processing Provider → Palm Detection: registers (evidence: `plantation_provider.py`)
- Processing Provider → Land Clearing Detection: registers (evidence: `plantation_provider.py`)
- Processing Provider → Road Analysis: registers (evidence: `plantation_provider.py`)
- Processing Provider → Drone Mission Planner: registers (evidence: `plantation_provider.py`)
- Processing Provider → Flood Prediction: registers (evidence: `plantation_provider.py`)
- Processing Provider → Vegetation Analysis: registers (evidence: `plantation_provider.py`)
- Algorithm Base → License Check: checks access (evidence: `algorithms/base_algorithm.py`)
- License Check → Supabase License Service: requests license (evidence: `license_guard.py`)
- License Check → License Dashboard: shows status (evidence: `algorithms/base_algorithm.py`)
