Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache Sphinx cache
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: docs/_build/cache
key: ${{ runner.os }}-sphinx-${{ hashFiles('docs/**/*') }}
Expand All @@ -69,7 +69,7 @@ jobs:
run: sphinx-build -b html -j auto -d docs/_build/cache -q docs docs/_build/html

- name: Save build doc as artifact
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: documentation
path: docs/_build/html/*
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/package_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Compile translations
run: lrelease ${{ env.PROJECT_FOLDER }}/resources/i18n/*.ts

- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: translations-build
path: ${{ env.PROJECT_FOLDER }}/**/*.qm
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
python -m pip install -U -r requirements/packaging.txt

- name: Download translations
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: translations-build
path: ${{ env.PROJECT_FOLDER }}
Expand All @@ -102,7 +102,7 @@ jobs:
--allow-uncommitted-changes \
--plugin-repo-url $(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')

- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: ${{ env.PROJECT_FOLDER }}-latest
path: |
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
python -m pip install -U -r requirements/packaging.txt

- name: Download translations
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: translations-build
path: ${{ env.PROJECT_FOLDER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Package the latest version
run: qgis-plugin-ci package latest --allow-uncommitted-changes

- uses: actions/upload-artifact@v5
- uses: actions/upload-artifact@v6
with:
name: ${{ env.PROJECT_FOLDER }}-latest
path: ${{ env.PROJECT_FOLDER }}.*.zip
Expand Down
25 changes: 25 additions & 0 deletions docs/usage/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,31 @@ The fault-fault relationship table defines the interaction between faults in the

![Fault Topology](../static/fault_topology_hamersley.png)

## Processing Tools

The plugin provides several QGIS Processing algorithms for working with geological data. These can be accessed through the QGIS Processing Toolbox.

### Paint Stratigraphic Order

The **Paint Stratigraphic Order** algorithm allows you to visualize the stratigraphic order on geology polygons. This tool is useful for:
- Visually debugging the stratigraphic column
- Quality checking unit order
- Creating visualizations of stratigraphic relationships

The algorithm takes:
- **Input Polygons**: A polygon layer containing geological units (e.g., your geology map)
- **Unit Name Field**: The field in your polygon layer that contains unit names
- **Stratigraphic Column**: A table or layer with the stratigraphic column (ordered from youngest to oldest)
- **Paint Mode**: Choose between:
- **Stratigraphic Order** (0 = youngest, N = oldest): Paints a numeric order onto each polygon
- **Cumulative Thickness**: Paints the cumulative thickness from the bottom (oldest) unit

The algorithm adds a new field to your polygon layer:
- `strat_order`: The stratigraphic order (when using Stratigraphic Order mode)
- `cum_thickness`: The cumulative thickness in the stratigraphic column (when using Cumulative Thickness mode)

Units that don't match the stratigraphic column will have null values, helping you identify data quality issues.

## Model parameters
Once the layers have been selected, stratigraphic column defined and the fault topology relationships set, the LoopStructural model can be initialised.

Expand Down
2 changes: 2 additions & 0 deletions loopstructural/gui/map2loop_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from .dialogs import (
BasalContactsDialog,
PaintStratigraphicOrderDialog,
SamplerDialog,
SorterDialog,
ThicknessCalculatorDialog,
Expand All @@ -14,6 +15,7 @@

__all__ = [
'BasalContactsDialog',
'PaintStratigraphicOrderDialog',
'SamplerDialog',
'SorterDialog',
'ThicknessCalculatorDialog',
Expand Down
37 changes: 37 additions & 0 deletions loopstructural/gui/map2loop_tools/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,40 @@ def setup_ui(self):
def _run_and_accept(self):
"""Run the calculator and accept dialog if successful."""
self.widget._run_calculator()


class PaintStratigraphicOrderDialog(QDialog):
"""Dialog for painting stratigraphic order onto geology polygons."""

def __init__(self, parent=None, data_manager=None, debug_manager=None):
"""Initialize the paint stratigraphic order dialog."""
super().__init__(parent)
self.setWindowTitle("Paint Stratigraphic Order")
self.data_manager = data_manager
self.debug_manager = debug_manager
self.setup_ui()

def setup_ui(self):
"""Set up the dialog UI."""
from .paint_stratigraphic_order_widget import PaintStratigraphicOrderWidget

layout = QVBoxLayout(self)
self.widget = PaintStratigraphicOrderWidget(
self,
data_manager=self.data_manager,
debug_manager=self.debug_manager,
)
layout.addWidget(self.widget)

# Replace the run button with dialog buttons
self.widget.runButton.hide()

self.button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel, self)
self.button_box.accepted.connect(self._run_and_accept)
self.button_box.rejected.connect(self.reject)
layout.addWidget(self.button_box)

def _run_and_accept(self):
"""Run the painter and accept dialog if successful."""
self.widget._run_painter()

Loading