[general]
name=Zones d'influence visuelle (ZIV)
qgisMinimumVersion=3.34
qgisMaximumVersion=4.99
supportsQt6=yes
version=1.2.3
author=G. DELSIGNE
email=gregoire.delsigne@outlook.fr

description=Visual influence zones (viewsheds) computed from the French IGN LiDAR HD elevation data: downloads the tiles covering an area of interest, merges them, computes the viewshed and loads the result styled in the project.

about=ZIV_prime computes Visual Influence Zones - in French "zones d'influence visuelle", ZIV - for a project site, from the high-resolution LiDAR HD elevation data published by the French National Geographic Institute (IGN). Typical use: assessing how far, and from where, a planned installation (solar farm, wind turbines, buildings) would be visible in the surrounding landscape.
    Given an area of interest, the plugin lists and downloads the IGN LiDAR HD tiles that intersect it (terrain model, surface model, canopy height model or raw point clouds), merges and resamples them, computes the viewshed over the resulting terrain, and automatically masks out woodland (IGN BD Foret) and buildings (IGN BD TOPO). The resulting raster is loaded into the project with a ready-made "night" styling. It can optionally suggest photo viewpoints for photomontages, spread evenly across disjoint visible patches and across distance rings, and placed on roads or close to buildings rather than in the middle of a field.
    The visibility algorithms ship with the plugin as an internal Processing provider, so no companion plugin has to be installed. The only Python dependencies are requests and numpy, both already bundled with QGIS.
    CREDITS - this plugin stands on two open-source QGIS plugins and would not exist without them:
    - The visibility engine (createviewpoints and viewshed) is derived from "Visibility Analysis" by Zoran Cuckovic, released under the GNU GPL v3 - https://github.com/zoran-cuckovic/QGIS-visibility-analysis
    - The discovery and download of the IGN LiDAR HD tiles is derived from "PointCloudFR" by Samy KHELIL, released under the GNU GPL v2 or later - https://github.com/sameeeyy/PointCloudFR
    ZIV_prime as a whole is released under the GNU General Public License v3 or later; see the LICENSE file shipped with the plugin. Elevation and landcover data (c) IGN, Licence Ouverte / Open Licence.

repository=https://github.com/VDEGREG/ZIV
tracker=https://github.com/VDEGREG/ZIV/issues
homepage=https://github.com/VDEGREG/ZIV

hasProcessingProvider=true
tags=viewshed,visibility,visual impact,lidar,lidar hd,ign,dem,dtm,dsm,elevation,terrain,france,ziv,zone d'influence visuelle,visibilite

category=Analysis
icon=icon.png

experimental=False
deprecated=False

changelog= 1.2.3 - Corrected the contact email: it was outlook.com instead of outlook.fr, so the plugin repository's confirmation email never arrived and the plugin could not be approved.
    Cleaned the vendored help text of the two visibility algorithms. It carried two <img> tags pointing at kofi2.webp and ukraine.png, neither of which ships in the package, so both rendered as empty boxes. The Ko-fi image was the only content of its link, which therefore did not show at all; it is now a plain text link, so the upstream author's donation link is visible for the first time. Also closed a <b> tag that was left open and fixed an invalid </font size>.
    Scoped all 51 unscoped QGIS and Qt enum accesses, the deprecated Qt5-style form.
    Qgis.Info becomes Qgis.MessageLevel.Info, QgsFileWidget.GetDirectory becomes QgsFileWidget.StorageMode.GetDirectory, and so on across 14 distinct enums in six modules. QGIS 4 still resolves the unscoped form through its compatibility layer, so nothing was broken - but the plugin declares qgisMaximumVersion 4.99, and that layer will not last forever. The same class of problem already caused a real crash in 1.1.0, where QDialogButtonBox.Ok simply does not exist under Qt6.
    Every scope name was resolved against the installed QGIS rather than guessed, and each rewrite was accepted only after checking that the scoped constant has exactly the same value as the unscoped one. The reference viewshed run still produces byte-identical rasters.
    1.2.2 - Cleared the last 27 findings of the repository scan, the try/except/pass and try/except/continue handlers (Bandit B110 and B112). Bandit now reports nothing at all on this package.
    25 of them became `with contextlib.suppress(Exception):`, the Python idiom for a deliberately ignored failure. It is exactly equivalent to try/except/pass and is not flagged.
    The two remaining ones used `continue`, which suppress cannot express, so they now report the failure instead of eating it: a failed reprojection in Points.py is appended to the `errors` list the function already logs, and OGR buffer failures in the photo-viewpoint helper are counted and reported once at the end.
    Verified against a reference viewshed run: the output rasters are byte-identical to those of 1.2.1, so no numeric result changed.
    1.2.1 - Cleared the two blocking findings of the plugin repository security scan.
    Removed the dependency installer, which shelled out to cmd.exe and pip through two .bat scripts: that tripped FILE_SUSPICIOUS (executable files in the package) and Bandit B603 / B607 (process execution). requests and numpy ship with QGIS, so the installer never actually ran; a missing package is now simply reported in the log. install_pip_packages.bat, py3-env.bat and requirements.txt are gone.
    Cleared the 54 code-quality findings of the repository scan, all of them in the vendored Visibility Analysis code: 21 bare except handlers now name Exception (E722), a comparison to None uses `is not None` (E711), three variables named `l` were renamed (E741), and tab indentation was converted to spaces (E101, W191). Verified against a reference viewshed run: the output rasters are byte-identical before and after, so no numeric result changed.
    Fixed Flake8 F821 in algorithms/modules/visibility.py: min_index was read before being assigned, a NameError waiting for the first pixel of a run with an error of 1 or more. Inherited from the upstream Visibility Analysis code.
    1.2.0 - Release prepared for the official QGIS plugin repository.
    Plugin renamed for display: "Zones d'influence visuelle (ZIV)" (the package folder, the provider ids genziv and pcfr_vis and the QgsSettings namespace are unchanged, so existing Processing models and preferences keep working).
    The viewshed height parameter is now labelled "hauteur de l'observateur" (observer height) and defaults to 1.7 m, eye level, instead of a panel height. The internal parameter id is unchanged, so existing Processing models keep working.
    The built-in cartographic export was removed, to keep the plugin focused on producing the viewshed itself. Gone with it: the optional PNG output parameter, the A4 layout template and its bundled logo, the logo and project name settings, and roughly 25 kB of layout code. The ZIV raster is still loaded and styled in the project, so any map can be composed with the usual QGIS layout tools.
    Fixed a crash on QGIS 4: the preferences dialog used the Qt5-style unscoped enums QDialogButtonBox.Ok / .Cancel / .ResetRole, which do not exist under Qt6, so the dialog raised AttributeError on every open. Two more in the error popup of the main algorithm (QMessageBox.Critical / .Ok). All six are now scoped. This affected 1.1.0 as well.
    Fixed the VERSION constant, which still read 1.1.0 while metadata.txt said 1.2.0 - the welcome message announced the wrong version.
    Description and about text rewritten in English. Author, contact email, repository, tracker and homepage filled in.
    GNU GPL v3 LICENSE and a README added at the root of the package.
    Upstream credits moved out of the internal algorithms/README.txt and into the public plugin description and the headers of the derived modules: "Visibility Analysis" by Zoran Cuckovic (GPL v3) for the visibility engine, "PointCloudFR" by Samy KHELIL (GPL v2 or later) for the IGN LiDAR HD tile download.
    Removed install_dependencies.bat: an orphan script inherited from PointCloudFR, never called by the plugin, that hardcoded a third-party user path and a single QGIS version.
    1.1.0 - Reprise du moteur ZIV depuis la derniere version du plugin d'origine.
    Points de vue photo (photomontages) repartis equitablement entre ilots disjoints et par anneaux de distance, places strictement sur route ou aux abords des batiments (jamais en plein champ).
    Legende des cartes PNG curee : rayon + points de vue + zone d'etude, plus les couches COMMUNE et courbes de niveau 10 m si presentes ; raster ZIV et fonds de carte exclus.
    1.0.0 - Version initiale de ZIV_prime.
    Plugin autonome dedie a la generation de Zones d'Influence Visuelle (ZIV) a partir du LiDAR HD de l'IGN.
    Fonctions : telechargement des dalles LiDAR HD (MNT/MNS/MNH/LIDAR) intersectant l'emprise, fusion optionnelle, calcul de visibilite (viewshed) via un modele de traitement embarque, masquage automatique des forets (BD Foret IGN) et des batiments (BDTOPO), export cartographique PNG A4, et suggestion en opt-in de points de vue photo (photomontages) repartis par anneaux de distance sur les secteurs les plus visibles et accessibles.
