[general]
name=AEP Tools
qgisMinimumVersion=3.16
description=Water supply (AEP) tools: DEM download, elevations with traceable quality and elevation-based pipe splitting for EPANET (steps 1-5); step 6 hydraulics: reservoirs from the EPANET model, ground elevation from static pressure checked against surveys, pressure-sensitive nodes and sampling plan
version=2.3.0
author=Kouidri Sofiane
email=sofihydro@gmail.com
about=Extracts elevations for water supply network layers from a free 30 m surface model: Copernicus DEM GLO-30 (ESA, TanDEM-X radar 2011-2015) or NASA SRTM (2000) and splits transmission mains by elevation difference to build EPANET nodes. Because a surface model gives roof height in built-up areas, step 6 derives ground elevation there from static pressure and the reservoir levels of the EPANET model, checks it against surveyed levels (contradictions are flagged, never averaged), measures the real DEM error per zone and finds the nodes where elevation can change the pressure verdict. Author: Kouidri Sofiane.
tracker=https://github.com/sofide13/aep_tools/issues
repository=https://github.com/sofide13/aep_tools
homepage=https://github.com/sofide13/aep_tools
tags=AEP, altitude, DEM, EPANET, reseau, Copernicus, SRTM, pression, decoupage, denivele, hydraulique, nivellement
category=Vector
icon=icon.png
experimental=False
deprecated=False
hasProcessingProvider=no
changelog=
    2.3.0 - Steps 1-5 unchanged. The former steps 6 (validation), 7 (sensitive nodes) and the new levelling are merged into one hydraulic step 6: reads EPANET reservoirs/tanks (.inp, unit conversion) and manual levels for partly known reservoirs, heads from the model (CSV), ground elevation from static pressure (Z = H - P - gauge height), survey priority with contradiction detection, measured DEM error (ME, RMSE, LE90) per rural/urban zone replacing assumed uncertainties when n >= 10, per-node probability that elevation flips the pressure verdict, sampling plan, cotes_epanet.csv for the model. Built-up areas no longer present DEM values as calculation elevations.
    2.2.0 - Cleanup and new step 7. Removed: old step 6 (duplicate of step 3, now accepts any point CSV with an EPSG), unreachable code for NASADEM/AW3D30/CopDEM-10 downloads, hard-coded western-Algeria zone, unverified accuracy claims. Shared helpers (_common.py), one haversine, grid index for step 5, single version number read from metadata. Validation is now step 6. Step 4 nodes get an ID and keep source/quality/uncertainty. New step 7: probability that elevation uncertainty flips the pressure verdict per node, and a sampling plan (X;Y;Z CSV) feeding step 6.
    2.1.11 - Step 2 (DEM download): the UI now lets you choose the source (Copernicus GLO-30 or SRTM via AWS terrain-tiles, both free, no key) and enter the bounding box manually (the 'manual' mode had no input fields). Zone validation and a 100-tile limit.
    2.1.10 - Inter-DEM check is ignored (with a warning) when the second DEM is incoherent with the main one (median bias > 30 m or P90 gap > 10x threshold), instead of flagging almost every vertex (seen with an IDW-interpolated surface used as 2nd DEM).
    2.1.9 - New step 7 'Validation': compares plugin altitudes to control points (CSV with mandatory columns X, Y, Z) and reports ME, RMSE, LE90 by reliability class, source, buildings and alert. Fix: optional fields (2nd DEM, FABDEM) no longer block step 3 when empty.
    2.1.8 - Final altitude blend: GLO-30 where no alert, optional FABDEM (bare earth, non-commercial licence) or along-pipe interpolation where flagged; new columns altitude_m (read by steps 4 and 5, was missing from step 3 output), source_altitude, dist_interp_m. Spike check rewritten (distance-based, positive narrow spikes, two scales so hills are not flagged).
    2.1.7 - Consistency checks without field survey: optional 2nd DEM (inter-DEM gap), buildings layer (OGR), profile spike detection; new columns ecart_dem2_m, bati, ecart_pic_m, alerte, qualite_finale. Fix slope pixel size (cos(lat) in geographic DEMs). README thresholds aligned with code. Validation claims reworded as author-reported.
    2.1.6 - Qt6 compatibility: fully qualified enums (QSizePolicy.Policy, Qt.AlignmentFlag, QFrame.Shape, etc.), flake8 E741 fix.
    2.1.5 - Security: HTTPS-only client based on http.client (no urlopen), empty except blocks removed.
    2.1.4 - Security: network calls restricted to https.
    2.1.3 - English metadata, author contact details, CITATION.cff.
    2.1.2 - Fix: GPS IDW calibration (default method) crashed because of a corrupted function. qgis.PyQt imports, About entry.
