Fracture Analysis 2D¶
Description¶
This QGIS plugin can be used to extract lineament & fracture size, abundance and topological parameters from two-dimensional GIS polylines along with their topological branches and nodes. The results will be given as graphical plots.
The plugin is experimental and installation requires the installation of a few external python libraries. Installation is done using a Python script but requires some manual setup.
This plugin uses four types of vector data as inputs: traces (Polylines), branches (Polylines), nodes (Points) and areas (Polygons).
Traces can be manually or automatically digitized GIS polyline features from e.g. Light Detection And Ranging (LiDAR) digital elevation models (DEMs) or from drone orthophotography of bedrock outcrop surfaces. Branches and nodes are derived from NetworkGT. Areas are the interpretation boundaries of the traces and branches.
Example plots¶
Installation¶
The plugin is experimental and installation requires the manual installation of a few external Python libraries. Installation requirements and guide below.
Legacy Installation¶
WARNING
This is the legacy installation method without the complementary installation script. Usage entirely at your own risk. Updates to this guide are not guaranteed when Python dependencies change.
Usage Guide¶
The plugin is controlled using a QGIS GUI interface. Guide below.
Dependencies and References¶
References¶
Both branches and nodes are derived from NetworkGT. For their definition along with the definition of the plots and the plotted parameters, I refer you to multiple sources.
-
NetworkGT Plugin introduction and guide.
-
Trace and branch size, abundance and topological parameter definitions.
My Master’s Thesis, Ovaskainen, 2020
Plots used in my Thesis were done with an older version of the same code used for this plugin.
-
Information about rose plots.
-
Length distribution modelling using the Python 3 powerlaw package.
-
Length distribution modelling.
NetworkGT¶
This plugin has been built to only work with data extracted using another QGIS-plugin, NetworkGT (see: Nyberg et al., 2018):
The NetworkGT (Network Geometry and Topology) Toolbox is a set of tools designed for the geometric and topological analysis of fracture networks.
If the input data (traces) you have can be processed in NetworkGT into branches and nodes it is suitable for this plugin. NetworkGT is available for both QGIS and ArcGIS and branch and node data from both should be valid inputs into this plugin (as of 15.2.2020).
External Python modules¶
This plugin is dependant on external Python libraries (and their subsequent dependancies) that are not installed by default in QGIS.
See Installation for installation guide.
Development¶
This plugin has been developed in PyCharm by setting the Python environment to mimic the environment of OSGeo4W Shell. Good guide for setup here.
Documentation for Python modules has been created using Autodoc. Autodoc has trouble running without setting the matplotlib backend to Qt5Agg. If you wish to remake documentation: Check conf.py and replace my ‘QT_QPA_PLATFORM_PLUGIN_PATH’ with your own path.
The requirements_dev.txt file contains all pip packages (custom) installed within my QGIS environment. It is therefore not clean and contains packages that are not required for development. It should contain all required packages however when complemented with the QGIS environment Python 3 packages.
Tests¶
To successfully run the plugin tests using pytest:
Open ./tests/__init__.py
Change to these Path variables to point to your QGIS installation:
qt5_plugins = Path(r'F:\OSGeo4W64\apps\Qt5\plugins') qt5_path = Path(r'F:\OSGeo4W64\apps\Qt5') qgis_apps_path = Path(r'F:\OSGeo4W64\apps')
Installation folder of QGIS differs based on whether you installed with:
OSGeo4W Network Installer or QGIS Standalone Installer
Standalone installation typically in C:\Program Files\QGIS or similar path
make.bat¶
The make.bat file in the root directory runs with plain:
make
Tests using pytest
Updates requirements_dev.txt for currently installer pip packages
sphinx to build documentation
For pb_tool to archive the plugin as an installable .zip file:
make zip
Requires a zip installer (e.g. 7zip) on PATH
To deploy the plugin to your QGIS plugin folder:
make deploy
This is the primary source installation method. See: pb_tool
And check ./pb_tool.cfg first
For Developers: Plugin documentation¶
- fracture_analysis_2d package
- Subpackages
- fracture_analysis_2d.fracture_analysis_kit package
- Submodules
- fracture_analysis_2d.fracture_analysis_kit.analysis_and_plotting module
- fracture_analysis_2d.fracture_analysis_kit.main module
- fracture_analysis_2d.fracture_analysis_kit.multiple_target_areas module
- fracture_analysis_2d.fracture_analysis_kit.qgis_tools module
- fracture_analysis_2d.fracture_analysis_kit.target_area module
- fracture_analysis_2d.fracture_analysis_kit.tools module
- Module contents
- fracture_analysis_2d.fracture_analysis_kit package
- Submodules
- fracture_analysis_2d.config module
- fracture_analysis_2d.fracture_analysis_2d module
- fracture_analysis_2d.fracture_analysis_2d_dialog module
- fracture_analysis_2d.install_script module
- fracture_analysis_2d.resources module
- Module contents
- Subpackages