[general]
name=qgSurf
description=Processing of geological planes and surfaces
about=qgSurf is a field-mapping/structural-geology plugin that can be used as an aid in: a) estimating the attitude of sub-planar geological surfaces given three or more points on a topographic surface; b) determining the intersection between a geological plane and a topographic surface; c) calculating the distance between points and a geological plane; d) plotting geological data in a stereonet; e) creating geological profiles.
category=Plugins
version=version 4.4.0
experimental=False
qgisMinimumVersion=4.0
author=Mauro Alberti
email=alberti.m65@gmail.com
icon=./icons/qgsurf.png

; start of optional metadata
changelog=
  4.4.0: [20260817] GeoProfiler: added projection of earthquake focal mechanisms, plotted as beachballs either in map view or rotated into the section plane, with their own style (quadrant colours, size, outline, alpha, labels) and export/import to the profile database
         [20260817] GeoProfiler: point and focal mechanism projection can now read the vertical field as a depth instead of an elevation, measured either from sea level (default) or below the topographic surface from a DEM, in km (default) or m, converted to elevation for plotting
         [20260817] GeoProfiler: projection of large datasets is orders of magnitude faster (collinear segments of densified profiles are collapsed, and points beyond the maximum distance are excluded by a buffer pre-filter before any projection); the progress bar now advances per block of points, over the whole run, instead of once per profile
         [20260817] GeoProfiler: fixed saving and loading of graphical parameters, which failed on save and returned unusable parameters on load; fixed projection along individual axes, which used the axis of an arbitrary profile segment instead of the one given for each point; fixed attitudes being paired with the wrong elevation when a record had no valid one; made focal mechanism labels legible; removed unreachable duplicate point-projection code
         [20260817] GeoProfiler: a single profile can now be exploded into its own window, with the full height to itself instead of a sliver of the stacked plot, and with its own graphical parameters, restyled from the window itself; several exploded profiles can stay open side by side for comparison; fixed an exploded profile being labelled "1" and taking the first profile's line-intersection colours whatever profile it showed
         [20260817] GeoProfiler: readable profile axes: vertical tick labels without the always-zero decimal and capped in number (five per profile by default), both axes optionally labelled in km, the vertical one optionally as a depth counting downwards, and each axis named with its quantity and unit; the profile number moved out of the way of the elevation labels; all of it configurable in the graphical parameters dialog and saved with the styles; fixed the requested elevation range not being honoured, as writing out the ticks widened the axis to span them
         [20260818] fixed the reading of degenerate geometries, where a single defective feature discarded the whole source layer: features with null or empty geometries, and parts with too few points, are now skipped and reported in the "qgSurf" log panel, in line and polygon intersections, point/attitude/focal mechanism projections, plane distances and best-fit plane; polygon intersections now keep the line parts of results that are not lines only, as produced by a profile touching a polygon; profiles defined from a line layer now read single-part geometries as well, and no longer require multipart ones
         [20260818] help: the GeoProfiler help is aligned to the current interface (numbered command tree, focal mechanism projection with its beachball styles, vertical values read as depths, single profile exploded into its own window, axis units and names, polygon categories taken from the layer symbology, unreadable features skipped and logged) and illustrated again, with the figures to retake marked "TO BE UPDATED" and the missing ones marked "TO INSERT"; same marking in the stereonet help, whose interface, style and plot figures predate the 4.3.0 additions its text already describes; note on skipped records added to the best-fit plane and plane distances helps
         [20260819] GeoProfiler: the profile number is now written inside the top left corner of its plot box, clear of the elevation tick labels it used to sit against, on a light patch that keeps it legible where the topography reaches the corner; the elevation axis name moved closer to the box, the room kept for the profile number no longer being needed
         [20260819] GeoProfiler: generating a 3D profile without having defined the output storage is now refused with an explanatory message, instead of being reported as successful while nothing was written; a generation whose lines cannot all be written to the storage layer now reports what was written, instead of confirming success and confining the reason to the "qgSurf" log panel
         [20260819] GeoProfiler: the commands defining the profile storage now say what went wrong: giving a new 3D line layer the name of one already in the geopackage reported only "Error with adding vector layer", and now names the conflict and points to "Append to existing 3D line layer in geopackage"; appending to a layer that does not exist, or that does not hold 3D lines, is refused when the layer is chosen instead of failing at write time, once the profile has been computed; creating a new geopackage over an existing file, which recreated it from scratch and destroyed every layer it held while reporting success, now asks for confirmation first
         [20260819] GeoProfiler: fixed focal mechanism and attitude projections keeping one record per label: the projection stores one solution per record key, and those two used the label alone as the key, so all the records sharing a label value collapsed into the nearest one to the profile - a layer whose label field is not unique showed a single beachball, or a single attitude, per profile. Records are now keyed by feature id as the point projections already were, and still labelled as before; the exported "src_fid" of projected attitudes and focal mechanisms, until now always empty, carries the source feature id
         [20260819] GeoProfiler: the beachball outline width is now a style setting, next to the outline colour, and its default drops from the 2 points obspy draws to 0.5: at the size beachballs have on a section, a 2 point outline blotted out the quadrant boundaries it was drawing
         [20260819] help: the stereonet help is fully illustrated as well - the interface, layer input, text input, plot style and plot figures are retaken, and the two figures its text described without showing are there: the P-T axes plot and the canvas-linked floating window with its depth/Z histogram
         [20260819] Stereoplot: fixed the crash on plotting after a change of project ("wrapped C/C++ object of type QgsVectorLayer has been deleted"): the input layer defined from the previous project was kept and used although QGIS had destroyed it. The input is now checked before every use - plot, redraw on selection change, depth histogram, canvas-rectangle-linked replot - and a source whose layer is gone is dropped and reported, asking for the input to be defined again
         [20260819] help: the GeoProfiler help is fully illustrated - every figure now shows the current interface or the current plot, the "TO BE UPDATED" and "TO INSERT" markers are gone along with the legend box that explained them, and the nineteen figures are numbered without gaps; removed help_0.2.html, the illustrated guide the current help replaced, which no code opened and whose captions described screenshots since retaken under the same names
         [20260819] help: the GeoProfiler quickstart no longer skips the definition of the output geopackage and 3D line layer, which is mandatory and comes first, and states that a topographic profile one already has is used as it is, entering the workflow at "1 - Choose 3D topographic profile"; quickstart, workflow diagram and section numbering follow the numbered command tree
  4.3.1: [20260803] fixed security issues flagged by the QGIS plugin repository scanner (Bandit): replaced runtime assert statements with explicit exceptions and silent except/pass blocks with logged exceptions, in qgSurf's own code and in the bundled apsg/geogst/affine libraries
  4.3.0: [20260713] fixed a crash in the Plane Distances tool (DEM grid CRS parameter)
         [20260726] GeoProfiler: removed the separate "Create geoprofile" step (each stage now computes immediately on confirmation); sped up line/polygon intersection and point/attitude projection (up to ~240x faster); fixed a point-projection crash and a topographic-profile calculation bug; added configurable profile sampling distance; various UI/compatibility fixes
         [20260802] Stereoplot: added P-T axes and tangent lineation (Hoeppner) diagrams with dedicated styles; added live canvas-rectangle-linked filtering with a paired floating window showing the live stereoplot and a vertical depth/Z histogram (local vs. total distribution); main stereoplot now follows the layer's QGIS selection; fixed invisible/missing direction arrows (tangent lineation, faults) and a division-by-zero for near-vertical slickenlines; invalid records are now skipped and reported instead of raising; GeoProfiler: default export database format changed to SQLite
  4.2.0: [20260601] porting to QGIS 4
  4.1.1: [20260601] fixed security issues
  4.1.0: [20260328] implemented export and import methods for GeoProfiler; UI changes
  4.0.2: [20260108] refactored embedded modules and fixed missing affine link
  4.0.1: [20260104] fixed not implemented feature and offset bug in GeoProfiler
  4.0.0: [20260101] new version of GeoProfiler with additional functions
  3.2.2: [20241221] fixed error-print related bugs in Geoprofiler tool
  3.2.1: [20240608] fixed mpl(>3.7.3)-related bug ("module 'matplotlib.cbook' has no attribute 'mplDeprecation'"); changed experimental to False
  3.2.0: [20231101] improved 'DEM-plane intersections' tool; renamed 'Points-Plane Distances' tool to 'Plane distances from points/DEM cell' and improved
  3.1.0: [20230615] fixed embedded mplstereonet and point-distances bugs, in 'Best Fit Plane' added polygon layers as input and distances from mean plane as output
  3.0.1: [20230316] fixed np.float deprecation warning
  3.0.0: [20221126] added profiles module; embedded mplstereonet; restored original method for DEM-plane intersections; fixed various bugs
  2.1.3: [20220227] intercepted ogr Geometry Destroy action for ogr-related bug
  2.1.2: [20210310] updated embedded mplstereonet and apsg modules; fixed macOs gdal import error
  2.1.1: [20200502] fixed bugs related to (1) apsg plane plotting and (2) plot of linear data 
  2.1.0: [20190312] in DEM-plane intersection, dip angle is decimal (with one digit)
         [20190501] in Geological Plane - Points Distances, more variables for each point are calculated
  2.0.0: added stereonet tool from geocouche; added module for calculation of distance between points and a geological plane; improved best-fit plane module;code refactoring; removed old modules dependences
  1.0.0: added pygsf; minor modifications to GUI and help for best-fit-plane calculations
  0.5.0: porting to QGIS 3
  0.4.1: fixed bug related to deformation orientation; (re)added warning on geographic DEMs, still not correctly supported
  0.4.0: added support for geographic DEMs; fixed conceptual bug related to the use of the project CRS
  0.3.5: fixed bug related to the use of polar CRS (i.e., lat-lon)
  0.3.4: removed (for QGis compatibility issues) both "geosurface_simulation" and "geosurface_deformation" modules: they are now an independent, stand-alone Python project (simSurf, available in GitHub)
  0.3.3: best-fit-plane: added point input from loaded point/line layer
  0.3.2: best-fit-plane: added saving of one or more point set solutions as shapefiles
  0.3.1: support for on-the-fly-projection for Best-Fit-Plane interpolation and DEM-plane intersection; minor bugs fixing
  0.3.0: added modules for the processing of geological surfaces (non-planar)
  0.2.3: fix graphic bug (dem intersection symbol not deleted on plugin close)
  0.2.2: version compatible with QGis 2.0
  0.2.1: calculate best-fit plane orientation given points drawn in the QGis map window
  0.2.0: map display/interaction is now through the QGis map window

; tags are in comma separated value format, spaces are allowed
tags=raster, dem, intersection, structural geology, geological planes

homepage=https://gitlab.com/mauroalberti/qgSurf
tracker=https://gitlab.com/mauroalberti/qgSurf/-/work_items
repository=https://gitlab.com/mauroalberti/qgSurf

; deprecated flag (applies to the whole plugin and not only to the uploaded version)
deprecated=False
