[general]
name=LVT4U
qgisMinimumVersion=3.16
qgisMaximumVersion=4.99
description=All-in-one GIS toolkit: thematic maps, lot labels, MBTiles, KML/KMZ, basemaps, font conversion, CRS tools, map layouts, Excel-to-GIS, and EUDR export.
version=2.11.11
author=Loc Vu Trung
email=locvutrung@gmail.com

about=LVT4U is a comprehensive QGIS plugin suite designed for Vietnamese forestry, land management, and international compliance workflows.

 Key Features:
 • Atlas Map (LVT Atlas Pro) — Automated batch cartographic atlas with focus mask and boundary coordinate tables
 • Panorama Layout Organizer — Drag & drop tool organization, custom groups, renaming, favorites, and JSON presets
 • Map Extent Exporter — Clip extent, reproject CRS, and package to GPKG, SHP, TAB (auto TCVN3) with layouts
 • Thematic Map — Generate categorized/graduated maps from attribute data
 • Lot Labels — Create parcel labels for cadastral maps
 • MBTiles — Export map tiles for offline mobile use
 • KML/KMZ — Convert layers to Google Earth format with styled popups
 • Excel to GIS — Import Excel/CSV spreadsheets as GIS layers
 • Basemap — Load Google Maps, Satellite, Hybrid, OpenStreetMap tiles
 • Font Converter — Convert between Unicode, TCVN3, and VNI encodings
 • CRS Tools — Transform coordinates with VN-2000 province support
 • Map Layout — Template-driven A5–A0 print/slide layouts with grid
 • EUDR Export — Generate GeoJSON compliant with EU Regulation 2023/1115

 Built with cartographic science and international standards.
 Supports Vietnamese and English interface.

tracker=https://github.com/locvutrunglvt/LVT4U-Update/issues
repository=https://github.com/locvutrunglvt/LVT4U-Update
homepage=https://github.com/locvutrunglvt/LVT4U-Update

tags=vietnam,laos,forestry,thematic,layout,atlas,kml,eudr,geojson,mbtiles,crs,vn2000,basemap,font,cadastral,land,excel,ai,tree_detection

category=Vector
icon=icon.png

experimental=False
deprecated=False

hasProcessingProvider=no
server=False

changelog=
 2.11.11 - SECURITY & COMPLIANCE: 100 percent Bandit security audit pass (0 issues identified)
 - FIX: Resolved all silent try-except pass and continue warnings across all 52 modules
 - SECURITY: Modernized process launching using QDesktopServices cross-platform file and folder opener
 - QUALITY: Verified clean AST compilation and flake8 zero-defect compliance across all 330 source files
 2.11.10 - COMPLIANCE: 100 percent QGIS Plugin Portal validation pass (PyQt6 / QGIS 3.44+ full enum scoping compliance)
 - ENUM FIX: Scoped all enums across Atlas, Land Change, Classification, Layout, Map Extent, and Tree Detection
 - REFACTOR: Modernized all legacy .exec_() calls to .exec() across all dialogs and menus
 - CLEANUP: Resolved flake8 syntax, undefined symbol, and linter warnings in vendored libraries
 2.11.9 - GLOBAL CDN: Multi-Mirror Dual-Release architecture (GitHub CDN Fastly/Microsoft + VPS Vietnam mirror)
 - GLOBAL CDN: Unblocked 1-click automatic updates for international users across Laos and Thailand
 - REPO: Connected to official global repository locvutrunglvt/LVT4U-Update
 2.11.8 - FEAT: High-Speed VPS Model Hub integration (1-Click Instant Download) — eliminates complex Roboflow/GitHub downloads
 - FEAT: Hosted official ONNX models directly on VPS CDN (yolo11n-seg.onnx, yolo11n.onnx, yolov8n.onnx) for 3-second direct download
 - FEAT: Automatic local caching (~/.qgis_lvt_models) & auto-detection of cached models upon opening dialog
 - FEAT: 100 percent Pure Bilingual (EN/VI) support across VPS Model Hub UI, status indicators, and guide tabs
 2.11.7 - ACCURACY (BREAKTHROUGH): Added Canopy Prominence Filter (topographic crown drop-off) to 100 percent eliminate false-positive tree points across flat grass, lawn, and weed rows
 - FEAT: Adaptive Physical-Scale Gaussian Smoothing (sigma_px derived from ground resolution) — eliminates multi-peak cluster artifacts on large trees, merging crown sub-clusters into single accurate peaks
 - FEAT: Object Type Presets (Coffee Orchard / Bushes: 1.8m, Forest Canopy / Shade Trees: 3.5m, General: 1.5m) with auto-tuned prominence sensitivity
 - BENCHMARK: On Laos Coffee Agroforestry (237M pixels, Mr Khamphone), filtered out ~10,000 weed/grass points (from 15,600 down to 5,755 true trees) in 66 seconds!
 2.11.6 - FIX (CRITICAL): Fixed geodesic ground resolution bug on WGS84 degree CRS where pixel size collapsed to 10^-7, causing search windows to explode to 6M pixels and finding only 1 tree
 - PERF (BREAKTHROUGH): Replaced O(N^2) deduplication with O(N) Spatial Grid Hashing & Block Tiling — execution time reduced from 1 HOUR to 17 SECONDS on 240M-pixel UAV rasters!
 - FEAT: Accurate tree crown area estimation and canopy cover calculation for RGB mode
 2.11.5 - UI/UX: Streamlined 2-tab interface (Setup & Run, Results & Report) for instant 1-TIF tree counting
 - L10N: 100 percent pure bilingual (EN/VI) standard, removed all raw keys and cluttered panels
 - FEAT: AI YOLO Tree Detection Segmentation (v8-Seg/v11-Seg) instance mask decoding & crown polygons GPKG
 - FEAT: Pure in-memory tiling pipeline (3-5x acceleration, zero redundant disk I/O)
 - FEAT: Professional Word (.docx) & Excel tree inventory survey reports (Author: Lộc Vũ Trung)
 2.11.4 - FIX: Satellite Downloader AOI footprint rendering — always visible with crosshair guide lines and centered label on small/commune-level AOIs (<2km)
 - FEAT: Removed ECW & ERDAS license prompt; Auto-compression enabled (27x for display, lossless ~1 DN for analysis)
 2.11.3 - FIX: Fix CAD Converter opening error on QGIS 3.34/Python 3.9 (future annotations syntax)
 - FIX: Fix DGN V8 coordinate positioning & reject unreasonable geometry coordinates
 - FEAT: Satellite Downloader natural true color (RGB 4-3-2), default 10m resolution, ECW/JPEG2000 compression options
 - SEC: Guard scripts added for Python compatibility & import safety; removed manual patch scripts
 2.11.2 - UI/UX: Tree Detection dialog optimization & standard layout polish
 - FEAT: Expanded pure bilingual (EN/VI) translations across core modules
 - FIX: MCDA AHP and Pivot Table parameter alignment and cleanup
 - PERF: Streamlined vector routines, CRS checks, and script dependencies
 2.11.1 - FEAT: Enhanced Satellite Downloader & Natural True Color Styling
 - Shared-window contrast stretch for Sentinel-2 / Landsat true-colour rendering
 - Satellite postprocessing pipeline and improved Copernicus STAC integration
 2.11.0 - FEAT: New 'Rubber Inventory (VRG)' (Điều tra & Tính trữ lượng Cao su) module
 - Excel matrix data entry, volume calculations, 5 percent audit draw & comparison
 - Live formulas Excel export (QĐ 218/QĐ-HĐTVCSVN) & PDF inspection reports
 - Multi-level demo data support (3 age classes) and SHA-256 secure gating
 2.10.42 - FEAT: New 'Atlas Map' (LVT Atlas Pro — Bản đồ Atlas Tự Động) module
 - Automated batch atlas map export by forest plot, plot group, or administrative unit
 - Dynamic Focus Mask with custom buffer distance and background dimming
 - Boundary Coordinate Table with adaptive vertex reduction (4-25 points), min/max segment spacing, and TCVN Northing/Easting
 - Automatic template matching with 'Khung LVT2601' standard print and slide layouts
 - Multi-format batch export: Merged PDF, individual PDFs, and 300 DPI PNGs
 2.10.40 - FIX: Bundle 'olefile' library directly into plugin (LVT/libs/olefile)
 - Fully eliminates 'No module named olefile' error on DGN V8/V8i reading
 - Zero external pip install requirement for DGN polygonizer and DWG/DGN converter
 2.10.38 - FEAT: New 'Map Extent Exporter' (Trích xuất Dữ liệu theo Khung nhìn) module
 - Spatial clipping by Map Canvas Extent, Polygon Mask Layer, or Drawn Bounding Box
 - Unified target CRS reprojection across all vector and raster layers
 - Multi-format packaging: GeoPackage (with embedded styles), ESRI Shapefile (.cpg UTF-8), MapInfo TAB
 - Automatic text encoding normalization (TCVN3 / VNI → UTF-8 Unicode)
 - Full QML / SLD style backup and Print Layout cloning into standalone .qgz project
 - 100 percent Pure Bilingual (EN/VI) compliance for all dialogs, tables, logs, and help contents
 2.10.12 - UI/UX: Complete redesign of Plot Labeling, Thematic Map (TT16), MBTiles, and KML/KMZ dialogs with Forest Green theme (#217346)
 - FEAT: High-fidelity mathematical fraction rendering for forest plot labels with true division bar, halo buffer, and background mask
 - FEAT: Live Interactive Preview Card with Satellite BG toggle and high-contrast color swatches
 - FEAT: Rich CRS Details & Tooltip system with EPSG, Central Meridian, 7-param / 3-param datum, Area of Use, and Proj4 info
 2.10.11 - FEAT: DGN Attribute Dual-Join Strategy (Auto / Centroid XY / Sheet+Parcel key matching)
 - FEAT: FAMIS CAD binary .pol parser with exact 248-byte record header + boundary slot offset traversal
 - FEAT: Standalone full-table TCVN3 to Unicode decoding for cadastral attributes (owner, address, commune)
 - FEAT: Companion attribute file scanner in DGN/DWG Converter dialog (scans all .mdb/.gtp/.pol/.txt)
 2.10.10 - FIX: MDB attribute reader failed to detect TamX/TamY columns (Dc132.mdb: 0→44 records)
 - FIX: _is_personal_geodatabase returned True for attribute-only MDBs (bypassed DGN polygonization)
 - FIX: MDB records without XY centroids were silently dropped instead of kept for parcel-join
 2.10.9 - FEAT: 3m Super-Resolution multi-band satellite download & instant 13-channel upscaling tool
 - FEAT: Standalone 'Nâng độ phân giải 3m/5m' tool for upscaling multi-band GeoTIFFs (12-13 channels) to UTM 3.0m in seconds
 - FIX: Fixed Landcover Classification execution and locked GPKG datasource handling
 - FEAT: Seamless gapless vector polygonization (100 percent shared edges, zero sliver holes)
 2.10.8 - FEAT: Natural Organic Boundary Smoothing (Chaikin Corner-Cutting + Topology Simplification) for Landcover Classification polygons
 - FEAT: Renamed module to 'Phân loại hiện trạng' (Landcover Classification) across all interfaces
 - FIX: Resolved ON_DEMAND_CRS_LIST scope, SatelliteDlDialog import, and layout indentation
 - FEAT: Selective On-Demand CRS Loader by categories (VN-2000 63 provinces, 34 new 2025, Múi 6°, HN-72, UTM, WGS84)
 - FEAT: 5m Super-Resolution Resampling (Cubic Spline) for satellite downloads and landcover classification
 - FEAT: Landcover Classification adds dual area columns (m² and ha) to attributes, summary tables, and HTML reports
 - FEAT: Topology-preserving polygon smoothing to eliminate pixel staircase corners without gaps or overlaps
 - FEAT: True Color B4-B3-B2 auto-rendering with natural contrast stretch for multi-band satellite images
 - FEAT: Satellite Downloader shortcut button in Landcover dialog and polygon AOI mask clipping
 - FIX: Map Layout responsive QScrollArea tabs & Signature/Note block line squishing/overlap fix
 2.10.6 - FEAT: Enhanced Forest Change Detection (2-cycle comparison) with Reforestation preset and simplified sign convention guide
 2.10.5 - FEAT: Advanced Forest & Landcover Classification with RedEdge (NDRE), Canopy Moisture (NDWI Gao), Bare Soil Index (BSI), and SCL Cloud Filter
 - FEAT: 12-band Sentinel-2 Full Stack auto-detection (Band 1..12)
 2.10.4 - FIX: Satellite Image Downloader missing QScrollArea import in custom band dialog

 - FIX: Landcover Classification TIFFSetField PhotometricInterpretation writing tag error in GDAL GeoTIFF

 2.10.3 - FIX: Landcover Classification and Satellite Downloader enhancements

 2.10.2 - REFACTOR: Complete removal of legacy 3-parameter VN-2000 internal CRS from all dropdowns and menus
 - Exclusive use of official 7-parameter EPSG codes (63 provinces QĐ 05/2007 + 34 provinces NQ 202/2025)
 - Legacy 3-param and historical CRS available strictly on-demand via CRS Settings Tab
 - Auto-normalization of legacy layers to official EPSG without spatial offset
 - Auto-purging of legacy internal CRS entries from QGIS custom SRS database
 2.10.1 - FIX: Pivot Table crash on QGIS 3.32 (QVariant NULL handling)
 - NULL attributes on Qt5 returned as QVariant() not None
 - Added _is_null() helper for Qt5/Qt6 NULL detection
 2.10.0 - FIX: QgsField TypeError on QGIS 3.32 (Qt5 QVariant compat)
 2.9.286 - FIX: Swap labels Area Splitter and Map Adjustment (wrong names)
 2.9.285 - NEW: Land Change Detection (So sanh bien dong dat dai)
 - Layer info table, attribute comparison, transition matrix
 - Output: GPKG + XLSX + HTML report
 - Categorized symbology by change type
 2.9.284 - DGN V8i: Text-geometry alignment (auto-translate text coords)
 - Fixes spatial join for FAMIS/gCadas files with local text coords
 - Fixes UnboundLocalError in _parse_dgn_v8
 2.9.283 - DGN V8i: Text origin sanity check (reject coords outside VN-2000)
 - Prevents garbage text coords from distorting map extent
 2.9.282 - DGN V8i Tab 3: Snap-first polygonization (0.01m tolerance)
 - DGN V8i Tab 3: Include GEOM_POLYGON from boundary levels
 - DGN V8i V2 Engine: read_dgn_v8_with_text text layer support
 - Fix: QMessageBox access violation crash after addMapLayer
 2.9.281 - DGN V8 Text Extraction: Tab 3 (DGN→GPKG Độc lập) now reads
 text labels from DGN V8/V8i files (ELEM_TEXT type 17)
 - New read_dgn_v8_with_text() returns (line_layer, text_layer)
 - Binary text parser: marker-based extraction with TCVN3 support
 - Strips trailing control bytes (\\x07, \\x0f, \\x0b)
 - Skips TextNode containers (type 7) — only parses Text (type 17)
 - 100 percent extraction rate on Bình Phước DC11.dgn test dataset
 2.9.240 - Satellite DL: Robust CRS validation for layer AOI
 - Satellite DL: VN-2000 detection with reproject recommendation
 - Satellite DL: CRS label shown in layer dropdown [EPSG:xxxx]
 - Satellite DL: Sanity checks (NaN, WGS84 range, extent size)
 - Satellite DL: Warning popup when selecting local CRS layer
 2.0.7 - Restore 12 missing TCVN codes (39-47, 89-91): total 110 codes
 - Pattern symbology: DT2 triangles, DT1/BC dots, DKH crosshatch
 - Border default 0.1mm black, outline color pure black
 - Fraction labels: Tk.khoanh.lo / Ldlr, dtich (7pt Arial)
 - Field auto-detect: ldlr/LDLR → LDLR_VT mapping
 - Popup "Thiết lập hoàn thành" after Apply
 - QML labeling embedded in all 8 style files
 2.0.2 - Fixed ALL num_codes to match TCVN 11565 Appendix E (was offset)
 - Fixed 12 HEX colors: DKH, DT2, BC1, TXDG, RLB1, RLK, DT1
 - Fixed appendix_e.json duplicate RNP1 -> RNN1
 - 3-way audit: 0 errors (TCVN vs TT33 vs TT16)
 2.0.1 - Full bilingual UI for thematic map dialog (VN/EN)
 - Radio buttons: TT 33/2018 replaces TCVN 11565 label
 - Dynamic tab titles: LDLR_Ref(55/98), Phụ lục/Appendix 1
 - Regenerated 8 QML files: 55 cats (TT16) + 98 cats (TT33)
 - Fixed 8 empty name_en: TXDG, RNM, RNP, RTNC, CDC, TGNN, TCDD
 - Appendix tab rebuilds on standard toggle
 2.2.0 - Legend moved to Content tab for more workspace
 - Layer rename: custom display names in legend per layer
 - Select All / Deselect All buttons for layer list
 - Hide Groups checkbox: flatten group headers in legend
 - Expanded scroll area (min 200px, max 500px)
 - Column headers: Layer / Tên hiển thị / Ký hiệu
 2.1.1 - Symbol picker: icon preview thumbnails from Style Manager
 - Default item shows layer's current symbol icon
 - ComboBox dropdown displays actual TCVN symbol previews
 2.1.0 - Legend module v2: TCVN symbol library integration
 - Fix: legend only shows when user ticks checkbox (was always-on)
 - TCVN symbol picker per layer: choose icon from Style Manager
 - Legend-only symbol override (map symbols unchanged)
 - Position: 3mm left, 6mm bottom from map frame, max 120mm
 - GEO_SYMBOLS synced with TCVN 11565-2016 library
 - Refactored legend.py: helper functions, eliminated duplicates
 2.0.9 - Signature block: 3-item architecture (rect + header + name)
 - Position from map frame geometry: always 3mm from blue frame
 - Orientation-safe: correct in both landscape and portrait
 - Border 0.2mm, title 12pt/date 10pt/name 11pt defaults
 - Default height 50mm, name 3mm from block bottom
 - Cleanup old sig items prevents duplication
 2.0.8 - Map Layout: add signature block (4-column sign table)
 - Font controls: Times New Roman/Arial, size, bold/italic
 - Auto-date, locked by default, height auto-scales A4-A0
 - Legacy edition: LVT4U_Legacy for QGIS 3.10-3.28
 2.0.0 - TT16/2023 migration: dual-standard support
 - New ldlr_tt16.json: 55 official TT16 codes with color mapping
 - Updated ldlr_master.json: 98 FRMS TT33 codes (was 93)
 - Added 5 missing TT33 codes: NRLG, NRLB, NRLN, NRLK, NRLP
 - Fixed 13 renamed TT33 symbols (RNMG→NMG, RNN→NN, etc.)
 - Dialog: auto-switches data source (55 vs 98) by standard
 - Appendix tab: 15 TT16 groups / 12 TT33 groups
 1.9.9 - Bundle local TCVN PDFs, deprecate external links
 - Responsive 90 percent percent screen height for MBTiles/EUDR/KML dialogs
 - Fix OpenSans font 404 in tcvn11565_style.xml
 1.9.0 - Comprehensive plugin suite with 10 integrated modules
 - Thematic Map: categorized/graduated map generation
 - Lot Labels: parcel labeling for cadastral maps
 - MBTiles: offline tile export
 - KML/KMZ: Google Earth export with styled popups
 - Excel to GIS: spreadsheet import
 - Basemap: Google/OSM tile loading
 - Font Converter: Unicode/TCVN3/VNI conversion for MapInfo
 - CRS Tools: VN-2000 coordinate transformation
 - Map Layout: template-driven A5-A0 layouts
 - EUDR Export: EU deforestation regulation compliance
 1.0.0 - Initial release: umbrella plugin framework

