GeoTrace is a a QGIS plugin containing some helpful tools for extracting and analysing the orientations of geological structures. It can be used to rapidly digitize structural traces in raster data, estimate their 3D orientations using an associated DEM, and then visualise the results on stereonets and rose diagrams.
The trace extraction method (Trace tab) uses a least-cost path algorithm to "follow" linear features in the raster. This relies on a single-channel cost raster in which the structures of interest are represented by low values, and the background by high values. A variety of functions for quickly calculating such a cost function have been included in the Cost Calculator tab.
The plugin can be in two ways.
C:/Users/USERNAME/AppData/Roaming/QGIS/QGIS3/profiles/default/python/plugins
. Note that you may need to create the plugins
folder.GeoTrace uses Numpy
, Matplotlib
, mplstereonet
and scikit-image
. QGis should come bundled with Numpy
and Matplotlib
.
The other dependencies should be automatically downloaded and installed the first time GeoTrace is run (at least on Windows and Linux). If this automatic install doesn't work then the plugin can be installed in by following the manual install instructions below.
Installing mplstereonet
and scikit-image
on Windows can be a little tricky, as skimage contains uncompiled c-code. The following instructions should work
in most cases however:
Open the start menu and search for OSGeo4W Shell. Right-click on it and select Run as administrator. This tool gives you access to the qGIS version of python
Check pip (a python package manager) is up to date with the following: python -m pip install --upgrade setuptools
Install mplstereonet first, using the following command: python -m pip install mplstereonet
Download precompiled 32 or 64 bit (depending on your version of QGIS) python wheels for cython and scikit-image 3.6 (otherwise you need to install a c-compiler) from:
Cython-0.26-cp36-cp36m-win32.whl
, 64 Bit: Cython‑0.26.1‑cp36‑cp36m‑win_amd64.whl
)scikit_image-0.13.0-cp36-cp36m-win32.whl
, 64 Bit: scikit_image‑0.13.0‑cp36‑cp36m‑win_amd64.whl
)Navigate the console to the directory containing these downloaded wheels (e.g. cd C:/SOME_DIRECTORY_NAME/
)
Install each package using pip: python -m pip install Cython-0.26-cp36-cp36m-win32.whl
and python -m pip install scikit_image-0.13.0-cp36-cp36m-win32.whl
(n.b. if you downloaded the 64 bit files the filename will change from -win32.whl
to -win_amd64.whl
)
Start/restart QGIS
Assuming these all installed correctly, you should now be set to use the plugin.
sudo pip install mplstereonet
On launching QGIS for the first time, the plugin needs to be activated using the QGIS plugin manager (Plugins->Manage and Install Plugins...). Providing the plugin has been
installed to the correct directory (see above), GeoTrace
should appear in the list of available plugins. Make sure it's checked, and with some luck QGIS won't complain about it
(throw errors).
Assuming this worked, a friendly compass icon should appear in the toolbar somewhere. Click this to launch the plugin. A window-pane should then appear, containing plugin GUI. This is organised into 5 tabs, each of which is described below.
The trace tab is used for computer-assisted digitization. Before starting, select:
Once the relevent information has been set, start interpreting by clicking the Start Digitizing
button.
Left-click adds control points to your trace and Right-Click completes a trace. Hit Backspace to undo.
If a DEM layer has been included (see above), best-fit-planes for each trace will be computed using the trace eigenvectors. It is important to note that this will often produce poor results, especially in flat topography or where the traces have variable orientations. To help identify traces with poor orientation estimates, trace eigenvalues are recorded in the output, along with a "planarity" metric that approaches 1 as as plane orientation becomes well constrained (cf. Thiele et al., 2015). For convenience, orientation estimates are also classified as "Good" (planarity<0.75), "Average" (0.5<planarity<0.75), and "Poor" (planarity<0.5). Also be aware that well-constrained ("Good") orientation estimates sub-parallel to the DEM surface can be produced if the structures being digitised have variable orientations.
The Advanced trace tab is used to generate traces from predefined control points. This uses a Cost layer and writes to an Output layer, as above, but rather than requiring manually
inserted control points it takes a point feature layer (Control Points) and ID field defining which trace each point belongs to (Unique ID Field), and will then automatically generate traces
on clicking Run
.
This tab wraps a variety of python functions from the scikit-image package for easy generation of cost rasters. Please refer to the scikit-image (http://scikit-image.org/) website for detailed descriptions of each of these functions.
The stereonet tab can be used to plot stereonets of planar orientation estimates (strike/dip or dip/dip direction) created using this plugin, or otherwise. Simply select the layer and associated fields containing the orientation estimates and then use the plotting tools to draw the stereonet.
This tab works as above, but creates a rose diagram rather than a stereonet.
GeoTrace is free software licenced under the GNU licence v2
If you found this tool useful, please cite Thiele et al., 2017. The publication also contains a more detailed description of the methods employed by this plugin.
Thiele, S. T., Grose, L., Samsu, A., Micklethwaite, S., Vollgger, S. A., and Cruden, A. R.: Rapid, semi-automatic fracture and contact mapping for point clouds, images and geophysical data, Solid Earth, 8, 1241-1253, https://doi.org/10.5194/se-8-1241-2017, 2017
For further information on the plane-fitting approach and planarity metric please refer to:
Thiele, S. T., Micklethwaite, S., Bourke, P., Verrall, M., and Kovesi, P.: Insights into the mechanics of en-échelon sigmoidal vein formation using ultra-high resolution photogrammetry and computed tomography, Journal of Structural Geology, 77, 27-44, https://doi.org/10.1016/j.jsg.2015.05.006, 2015
Where the derived orientation estimates are of critical importance, the following will also be a useful reference:
Seers, T. D. and D. Hodgetts., Probabilistic constraints on structural lineament best fit plane precision obtained through numerical analysis Journal of Structural Geology 82: 37-47, https://doi.org/10.1016/j.jsg.2015.11.004 2016