[general]
name=Granulometria por Fotointerpretacion
qgisMinimumVersion=3.22
description=Measures rock grain sizes in a photo by photointerpretation and exports gradation reports.
about=Granulometria por Fotointerpretacion (Photointerpretation Grain Size Analysis) measures the size of rock grains in a georeferenced photo, typically captured by drone. The user draws the photo outline to obtain the total area, then draws or adjusts grain polygons (for example, produced by a segmentation tool such as GeoAI/Segment Anything). The plugin filters grains by a sieve-size threshold - grains below it are removed from the polygon layer and their area is counted as fine material - computes coarse/fine areas and percentages, and exports: (1) an Excel workbook with area/diameter data in a fixed template layout, (2) a second Excel workbook with image and material summary information, and (3) a GeoPackage bundling the polygon layer, the source photo raster, and an embedded QGIS project, exported as-is in the project's coordinate system (no reprojection). It also offers an optional lossless cropping step and a photo-labelling tab (date, free text and your own logo) for report evidence. No external Python packages are required: the plugin only uses Qt (via qgis.PyQt) and qgis.core/qgis.gui, all of which ship with QGIS.
version=1.0.3
author=Jean Pardo
email=jeandariopardo@gmail.com
homepage=https://github.com/PardoJean/GranulometriaPorFotointerpretacion
tracker=https://github.com/PardoJean/GranulometriaPorFotointerpretacion/issues
repository=https://github.com/PardoJean/GranulometriaPorFotointerpretacion
icon=icon.png
experimental=False
deprecated=False
category=Plugins
tags=granulometry,grain size,particle size,gradation curve,sieve,geotechnics,soil,rock,aggregate,mining,quarry,photointerpretation,photogrammetry,drone,uav,orthophoto,segmentation,image analysis,raster,vector,polygon,area,report,excel,geopackage,astm

changelog=1.0.3 - First stable (non-experimental) release. Fixes a quantisation bug that rounded grain diameters to 2 decimals in metres (1 cm steps), corrupting the exported diameter column and the finer sieves of the gradation curve - diameters now keep 4 decimals. The real-pixel-footprint computation no longer unions thousands of speckle polygons one by one (which could freeze QGIS for minutes on a large drone orthophoto) and closes its GDAL dataset. The drawing tool no longer leaves the dialog hidden forever when another QGIS tool is picked mid-drawing, and is deactivated when the dialog closes instead of firing callbacks into a destroyed dialog. Added guards for an empty polygon layer, a self-intersecting total-area outline and a photo without a valid CRS, which previously produced silently wrong percentages. The plugin's own "no polygon layers" message is now shown as an error instead of a green success banner. Declared qgisMinimumVersion raised from 3.0 to 3.22, the real API floor (writeAsVectorFormatV3 and scoped enums do not exist before it).
    1.0.2 - New optional photo-cropping step before analysis (free-form polygon, no quality loss), drawable by segment, by flow, or as a rectangle - the same three modes also available for the total-area outline, which now shows and lets you pick which photo it acts on (synced with the "Prepare Photo" selector). Total area is computed from the raster's real pixel footprint instead of its bounding box, fixing up to ~39%% overestimation on photos with a transparent border. The temporary total-area layer is removed from the layer panel right after a successful export. Main dialog reorganised into tabs (Prepare Photo / Analyse / Label Photo) with a native QGIS look (inherited theme and font, QGIS's own icons instead of emoji) and visible keyboard focus. New "Label Photo" tab: stamps the date (calendar picker) with a free text stacked above it (both bottom-left), plus a private, remembered logo (bottom-right); text/logo size default to a fixed 60px/800px; the white padding these lab photos have outside the actually-photographed area is replaced with solid black and the photo rotated to landscape when portrait, so the exported file matches the preview exactly; suggested filename is the date; wrapped in its own scroll area so it doesn't stretch the other tabs. "Process Layer" no longer opens the attribute table. Added a license/contact notice (GPLv3; commercial use/adaptation asked to go through the author first).
    1.0.1 - Qt6 compatibility fixes: fully-qualified enums, imports via qgis.PyQt instead of PyQt5, exec_() renamed to exec(). Removed a silent except/pass in the GeoPackage overview-building step (now logs the error instead of discarding it).
    1.0.0 - First public release.
