LULC Carbon Stock Estimator - QGIS Plugin
=========================================

Author  : Muhammad Parif (payip28muhammad@apps.ipb.ac.id)
Version : 0.1.0
License : GNU General Public License v2.0 or later

1. OVERVIEW
-----------
LULC Carbon Stock Estimator estimates Above-Ground Biomass (AGB),
Above-Ground Carbon (AGC), optional Below-Ground Carbon (BGC), and
CO2-equivalent stocks from Land Use/Land Cover (LULC) datasets in both
Raster (GeoTIFF) and Vector (Shapefile/GeoPackage) formats.

The calculation engine follows SNI 7645:2010, Tosiani (2015), and the
Indonesian Forestry Competency Standard Module KHT.IK02.053.01
(Menghitung Cadangan Karbon).

2. INSTALLATION
---------------
1. Place the "lulc_carbon_estimator" folder inside your QGIS active profile
   plugins directory:
   C:/Users/<USER>/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins/
   (Or install directly from lulc_carbon_estimator.zip via
    Plugins -> Manage and Install Plugins -> Install from ZIP).
2. Open QGIS -> Plugins -> Manage and Install Plugins.
3. Enable "LULC Carbon Stock Estimator".

3. UNIVERSAL CLASS CODES (ID 1 - 23)
------------------------------------
When preparing classified LULC rasters or vector attributes, use the
following universal numeric IDs, SNI/KLHK acronyms, or KLHK numeric codes
for automatic carbon factor assignment:

ID | Acronym | KLHK  | Class Name                        | Mean AGB | Mean AGC
---+---------+-------+-----------------------------------+----------+---------
1  | HP      | 2001  | Hutan Lahan Kering Primer         | 269.4    | 126.618
2  | HS      | 2002  | Hutan Lahan Kering Sekunder       | 203.3    | 95.551
3  | HMP     | 2004  | Hutan Mangrove Primer             | 263.9    | 124.033
4  | HMS     | 20041 | Hutan Mangrove Sekunder           | 201.7    | 94.799
5  | HRP     | 2005  | Hutan Rawa Primer                 | 274.8    | 129.156
6  | HRS     | 20051 | Hutan Rawa Sekunder               | 170.5    | 80.135
7  | HT      | 2006  | Hutan Tanaman                     | 64.0     | 30.080
8  | PK      | 2010  | Perkebunan                        | 63.0     | 29.610
9  | B       | 2007  | Semak Belukar                     | 30.0     | 14.100
10 | BR      | 20071 | Semak Belukar Rawa                | 30.0     | 14.100
11 | PC      | 20092 | Pertanian Lahan Kering Campur     | 30.0     | 14.100
12 | PT      | 20091 | Pertanian Lahan Kering            | 10.0     | 4.700
13 | TR      | 20122 | Transmigrasi                      | 10.0     | 4.700
14 | PM      | 2012  | Pemukiman                         | 5.0      | 2.350
15 | S       | 3000  | Savanna / Padang Rumput           | 4.5      | 2.115
16 | T       | 2014  | Tanah Terbuka                     | 2.5      | 1.175
17 | SW      | 20093 | Sawah                             | 2.0      | 0.940
18 | TM      | 20094 | Tambak                            | 0.0      | 0.000
19 | A       | 5001  | Badan Air                         | 0.0      | 0.000
20 | RW      | 50011 | Rawa                              | 0.0      | 0.000
21 | BDR     | 20121 | Bandara / Pelabuhan               | 0.0      | 0.000
22 | PB      | 20141 | Pertambangan                      | 0.0      | 0.000
23 | AW      | 2500  | Awan                              | 0.0      | 0.000

4. WORKFLOW
-----------
1. On Tab 1 ("1. Input & Parameter"), choose Raster or Vector mode, select
   your LULC layer (and band/field), and configure Carbon Fraction / BGC / CO2e.
2. On Tab 2 ("2. Tabel Kelas & Faktor Karbon"), click "Scan Kelas dari Layer"
   to extract unique classes and calculate area (ha), or load a built-in preset.
3. Review or customize Mean AGB / Mean AGC factors in the interactive table
   (or import your own CSV/JSON lookup table).
4. Click "Hitung Cadangan Karbon" to view KPI summaries and class breakdowns
   on Tab 3 ("3. Hasil & Ekspor"), export CSV/Excel (.xlsx), and add the
   spatial carbon layer (GeoTIFF ton C/ha or styled vector layer) to QGIS.
