[general]
name=AutoTrace Stratigraphic Boundary
qgisMinimumVersion=3.22
qgisMaximumVersion=4.99
supportsQt6=True
description=Predicts stratigraphic boundary outcrop lines from dip/dip-direction outcrop points and a DEM (structure-contour method), stops them at faults, builds a geological map from the edited lines, and a 3D geological model with sections. 依構造等高線原理由露頭位態與 DEM 預判地層邊界線並產生地質圖。 Video tutorials / 操作影片: step-by-step on sample c22 (1.5) / 範例 c22 逐步實作: 中文 https://youtu.be/Pe6jOgQQ1Mo ; English https://youtu.be/n-wolRDxy5o . Introduction (1.4) / 功能介紹: 中文 https://youtu.be/5PLR4HU3O1w ; English https://youtu.be/risDZpzG0dE
about=For each outcrop point of a stratigraphic boundary (dip, dip direction, upper and lower unit codes) the boundary plane is intersected with the DEM, and the outcrop line is followed to both sides of the point.
    Points of the same boundary in the same fault block are joined end to end through an inverse-distance blend of their planes, and lines stop on faults.
    Contact types: conformable (C), overlap unconformity (U) and inset / cut-and-fill unconformity (I, river terraces and alluvium, younger unit on the lower ground). Unconformities are drawn first and cut the older lines; unconformity dips can be fitted from neighbouring points.
    Before tracing, Check stratigraphic boundary points lists doubtful points (unit codes, upper / lower order, contact types against the stratigraphic table, attitudes against neighbouring points and measured bedding, duplicates) with suggested fixes; Apply accepted check suggestions writes a corrected copy after the user's review.
    A second tool polygonizes the edited boundary lines with the faults and assigns units from the side of each boundary, producing a geology layer.
    A third tool builds a 3D geological model and geological sections from the geological map, DEM, attitudes and faults (implicit potential-field method), saved as GeoPackage (2D section sheet + 3D layers), DXF / OBJ / STL and an offline three.js 3D viewer.
    Includes downloadable sample projects (oblique-slip fault displacing a plunging fold; angular unconformity with outliers; folds and a fault below an unconformity) and an illustrated guide to the principle and operation.
    User interface and guide: English, 繁體中文, 简体中文, 日本語 (follows the QGIS locale, switchable in the plugin menu).
    Requires only QGIS (GDAL and NumPy shipped with QGIS).
version=1.5.0
author=yoshihuang
email=yoshi.hml@gmail.com
changelog=
    1.5.0 Video tutorial, step by step on sample c22 (check points, trace, map, 3D model and sections): Chinese https://youtu.be/Pe6jOgQQ1Mo, English https://youtu.be/n-wolRDxy5o. Contact types C / U / I (field contact): unconformity points of one upper unit form one surface; lines drawn in the order inset, overlap, bedding, later lines cut at earlier unconformities (only the part inside the younger unit is removed); inset unconformities put the younger unit below the surface; dips of unconformity points fitted from neighbouring points; geology map writes true strat_order, series (new series above overlap unconformities) and kind = fill; 3D model builds valley fills (kind = fill). New samples c21 (angular unconformity and outliers) and c22 (folds and a fault below an unconformity, plus valley alluvium as an inset unconformity) from geomap-workbench, with contact types. Guide: contact types and characteristics of inset unconformities. 3D model / sections: map conditioning of unconformities (no younger series where the map shows older units), contacts across missing units used, interface levels kept in stratigraphic order, series and fill units decided by line length and contacts (robust to a few wrong points), checks for suspicious boundary data, finer section rows clipped to the ground, default depth from the relief. Units without thick_m get a minimum thickness estimated from their outcrop width and the attitudes. Faults: a fault exists only along its map trace (it was extended without end along strike, so every fault cut every section and offset the whole model); pieces of the same fault are merged; faults with no dip direction are drawn in a section only where their trace crosses it; the field name / Name is recognised; a section shows one trace per fault (pieces reaching the ground, else the longest piece), no fragments of fault strands at depth; a fault whose offset cannot be told apart from an interface level (its hanging-wall contacts are exactly one interface) is left out of the solve instead of making the levels blow up. Thickness mode (on by default; thicknesses estimated from the outcrops where thick_m is empty): interfaces spaced by thick_m, nothing drawn below the base of the oldest unit, unit thickness kept where there are no attitudes (direction from the nearest attitudes), points added where the units at the ground clearly disagree with the map. Folds: anticline / syncline read from the type, name or note (背斜 / 向斜), limbs constrained (dip away from anticlines, towards synclines), name field Name / 名稱 recognised, fold constraints given to the folded (oldest) series. Sections: fault and fold names labelled; a fault is drawn wherever it still offsets the layers (also in the tip zone beyond the end of its map trace). A fault digitized in several strands is drawn once per section, along the strand at which the contacts are visibly offset. Faults that end at an overlap unconformity continue beneath the cover (tracing, geology map and 3D model): the older units below are split into fault blocks and offset by the fault, and the unit below each piece of the unconformity changes across the fault (c22: map agreement 86.5 -> 98.7 percent, M2 restored). Building the map: a previous map made by the tool (field qa) can be the template; only unit names, thick_m and the style are taken from it. Rules of Bennison, Simpson and Lisle: fault downthrow side read from the map (younger units), type from the record (normal when not stated), missing dips 80 deg normal / 45 deg reverse, missing dip directions towards the downthrow (normal) or upthrow (reverse) side, offsets opposite to the map not used, faults offset only the series they cut on the map; in sections a fault is drawn only through the units it displaces (fills / terraces only where the map shows it cutting them, as in geomap-workbench). Fold limbs only from the attitudes measured on each limb. Geology map: thick_m from the top and base outcrops and the attitudes (true thickness = distance between the two surfaces perpendicular to the bedding, = VT cos dip; checked on the 26 geomap-workbench cases, within a few metres of the true thicknesses). Tracing: optional fold axial traces split the map into limbs, each with its own structure contours (meeting continuously at the hinge). Geology map: unit points decide where several agree or where the boundary sides are unclear. Sample projects open zoomed to their layers. New tools Check stratigraphic boundary points (unit codes, contact types against the stratigraphic table, attitudes against neighbouring points and measured bedding, reversed dips, three-point height misfits, unconformity points off their surface, duplicates) and Apply accepted check suggestions (corrected copy of the points after the user's review); the tracing warns about doubtful points. Sections: a contact between adjacent units that no data shows (map contact off the faults, boundary lines, boundary points, boreholes) is not drawn: the units below it are drawn only where connected to their outcrop on the section line without crossing an offsetting fault (blank areas bounded by bedding and fault surfaces); optional input boundary lines. Checked on all 26 geomap-workbench cases (dev/test_workbench.py). Tracing: optional derivation of missing boundaries from the unit thickness and the fault throw (vertical separation), optional subcrop lines on overlap unconformities. 3D model: optional borehole contacts. Fault offsets written to the log.
    1.4.2 Description: links to the YouTube video tutorials (Chinese https://youtu.be/5PLR4HU3O1w, English https://youtu.be/risDZpzG0dE).
    1.4.1 Fix "No transform is available between Geological section (distance, elevation) and EPSG:4326": section layers keep the model CRS; their coordinate values are unchanged (x = distance from 0, y = elevation).
    1.4.0 Sections: each section line in its own GeoPackage layers and its own QGIS project; local section coordinates (x = distance from the section start, 0 at the left; y = elevation x V.E.).
    1.3.2 Sample folder renamed to case (case/case.qgz, case/data.gpkg, case/DEM.tif).
    1.3.1 Sample project renamed: case.qgz with data.gpkg (all paths in the project updated).
    1.3.0 3D model: all outputs (GeoPackage, 3D viewer, DXF / OBJ / STL) to one chosen folder; sections shown in a new QGIS project and window (with print layout), the current project is left unchanged; section cut in the 3D viewer; sample project updated (results of every step included).
    1.2.0 3D model: fold axial traces as an input (hinge constraints, shown in the viewer and on sections); DXF / OBJ / STL / viewer as separate output files; the QGIS map is draped on the terrain (viewer, OBJ texture, georeferenced PNG).
    1.1.0 New tool: 3D geological model and geological sections from the geological map (implicit potential-field method), exported to GeoPackage, DXF / OBJ / STL and an offline 3D viewer. Sample data updated (point 69).
    1.0.0 First stable release (same features as 0.1.2).
    0.1.2 Pass plugins.qgis.org checks: no try/except/pass (bandit B110), Qt6 scoped enums, exec() instead of exec_().
    0.1.1 Fix "wrapped C/C++ object of type AlgorithmWidget has been deleted" when closing the tool dialogs in QGIS 4; dialogs now open non-modally.
    0.1.0 First release: boundary tracing, geology builder, sample project, multilingual help (en, zh_TW, zh_CN, ja).
tags=geology,unconformity,terrace,3D geological model,geological section,cross section,stratigraphy,structure contour,dip,strike,DEM,fault,geological map,outcrop,mapping
homepage=https://github.com/yoshihuang/AutoTraceStratigraphicBoundary
repository=https://github.com/yoshihuang/AutoTraceStratigraphicBoundary
tracker=https://github.com/yoshihuang/AutoTraceStratigraphicBoundary/issues
category=Analysis
icon=icons/icon.png
experimental=False
deprecated=False
hasProcessingProvider=yes
server=False
