[general]
name=ArchToolkit
qgisMinimumVersion=3.40
qgisMaximumVersion=4.99
description=Integrated archaeology toolkit for QGIS covering terrain, visibility, cost, networks, AHP suitability, trench planning, geology, and AOI reporting workflows.
version=0.1.6
author=balguljang2 (lzpxilfe)
email=lzpxilfe@gmail.com
license=GPL-3.0-or-later
repository=https://github.com/lzpxilfe/archtoolkit
tracker=https://github.com/lzpxilfe/archtoolkit/issues
homepage=https://github.com/lzpxilfe/archtoolkit
tags=archaeology,cultural-heritage,dem,kriging,geostatistics,ahp,contour,dxf,viewshed,line-of-sight,terrain-profile,terrain-analysis,slope,aspect,cost-surface,least-cost-path,least-cost-network,network,ppa,visibility,wms,geochem,geology,geological-map,kigam,cadastral,overlap,map-styling,ai,고고학,문화유산,가시권,가시선,지형,단면,비용표면,최소비용경로,최소비용네트워크,근접성,지적도,중첩,지구화학도,지질도,크리깅,AHP,지오통계
icon=icons/archtoolkit.png
experimental=false
deprecated=false
about=ArchToolkit is an integrated QGIS plugin for archaeological and cultural-heritage workflows.
  It includes DEM generation, terrain analysis (slope/aspect/TPI/TRI/curvature/aspect derivatives), viewshed and line-of-sight tools, cost surface and least-cost path/network analysis, spatial/visibility networks (PPA), AHP site suitability, trench suggestion, covariate align/export and correlation/VIF reporting, terrain profiles, cadastral overlap, map styling, slope/aspect drafting, GeoChem helpers, KIGAM geology ZIP loading, and AI-assisted AOI reporting.
  Requirements: QGIS 3.40 or later (QGIS 4 / Qt6 spellings verified against PyQt6, not yet exercised on a QGIS 4 build), Processing, GDAL, and NumPy in the QGIS Python environment.
  Optional service: Gemini API access for AI AOI reporting.
changelog=0.1.6 - Third code review round: no silent wrong coordinates, no silent write failures, no GUI freezes. Coordinate transforms now fail closed - transform_point raises on error and QgsGeometry.transform's non-zero return code is checked at ten call sites, so tools skip or abort instead of plotting results at untransformed coordinates. Every GeoTIFF write is verified (GDAL error state plus a reopen check) and a truncated file is deleted instead of published. All 35 processing.run call sites run through the QGIS task manager (new tools/processing_task.py) with progress, cancel and a stalled-task watchdog; map styling aggregation, PPA centralities and the curvature/aspect array paths run on QgsTask workers. Viewshed LOS samples a window instead of up to 200k provider.sample() calls, tracks its result temp files to their layers, closes the progress dialog on early exits and caps stored LOS profiles. Trench scanning samples precomputed slope/aspect/AHP windows (no identify() per point) and is cancellable. AI reporting asks for consent before sending the context to Gemini, frees its network replies, isolates prompt data and neutralizes CSV formulas. AHP reclass tables reject gaps wider than one unit (gap cells scored a silent 0.0); cost surface and cost network guess undeclared DEM sentinels (-9999 and friends) and report it. Curvature and aspect-derivative computes run off the GUI thread under a machine-aware memory guard. Assorted leak fixes: geology rasterize-retry temp GPKG, map tool restore, dialog-memory late restore, and result temp files survive a plugin reload via layer-stamped tracking.
  0.1.5 - Code review of all nineteen tools; each defect was reproduced on synthetic data and checked against an independent calculation before the fix. A review of six tools fixed: distance rasters now declare NoData; align/export keeps AOI clips on the reference grid and honours layer NoData; the VIF report samples inside the AOI polygon and caps n; AHP handles constant criteria, out-of-range preferences and hierarchy CR; trench slope is measured over the real footprint and AHP-NoData candidates are excluded; the AOI report refreshes its cache and labels buffer scope. A second review of the other thirteen tools fixed: results deleted from the layer tree on re-runs (five tools); approximate radius TPI (now an exact focal mean); visibility-network LOS misjudging slopes; the Herzog wheeled critical slope read as degrees (now percent); viewshed NoData, off-DEM observers and LOS steps; DEM inputs mixing contours and spot heights; GeoChem breakpoint classes and inpainting; cadastral rows lost on geometry collections; geology NULL codes; profile charts smoothed without notice; map-styling code names now per NGII tables. Viewshed range masking no longer depends on GDAL's out-of-range flag (GDAL 3.11 wrote 0 on the window's edge rows). CI runs on QGIS 3.40 and 3.44 LTR. Dedicated icons for the VIF report and the trench suggestion; the image generator's corner mark was removed from the icons.
  0.1.4 - Practicality and honesty release, verified against the previous code under a real QGIS 3.34 (27 before/after scenarios, 350 tests). Every tool help ends with a scholarly-basis block (which published method, how its authors meant it to be used, what the tool does not claim, sources); every dialog remembers its last inputs; icons moved to icons/ at 256 px. Output-changing fixes: corrected TPI window; DEM generator refuses 2D contours without an elevation field instead of publishing an empty DEM and snaps the grid; Kriging (Lite) is exact at data points; GeoChem rejects off-legend colours as NoData and counts zones by the pixel-centre rule; geology codes are unified across sheets; co-located sites share PPA edges; untested LOS pairs are counted as fail_deg; trench rank follows score; distance rasters burn lines and polygons with -at and refuse empty or non-square grids; align/export resamples aspect nearest and marks unknown categoricals; AHP hierarchy weights are actually used; the AI report classifies every scanned site and flags truncation. Citations verified against Crossref and other primary sources (0 nonexistent, 9 misattributions corrected); REFERENCES.md labels (A) called algorithms, (B) implemented formulas, (C) context. Relative-slope cost reference default 1 to 5 degrees; LOS curvature correction on by default. Sources rewritten for QGIS 4 (PyQt6): scoped enums, QMetaType field types, Qgis.* enums, with a small runtime-probed compatibility module; qgisMaximumVersion raised to 4.99. Verified on QGIS 3.34 (350 tests, 27 regression scenarios unchanged) and against PyQt6 6.11; not yet run on a QGIS 4 build. Plugin ZIP build script and release workflow added.
  0.1.3 - Security-scan hardening (every swallowed exception logged) and the full-code review fixes: help dialog crash, AHP scoring/NoData/grid validation, trench coverage-first placement, contour NoData, Pandolf descent clamp, Wasserman-Faust closeness, viewshed sampling with curvature/refraction, terrain memory and CRS guards, atomic align/export with categorical protection and manifest, new Distance to Features tool, TRI radius, Weiss classification honouring the TPI radius, memory-based cost budgets, AHP guide.
  0.1.2 - Scroll-safe popups for long text; flake8 cleanup.
  0.1.1 - UI language setting; shared dialog chrome; i18n fixes; safer geology QML parsing.
  0.1.0 - Initial public beta.
