Skip to content

Commit a842f9a

Browse files
authored
Merge pull request #2 from danpejobo/dev
v.2.0.0
2 parents 9e13738 + 6ee05c4 commit a842f9a

25 files changed

+1041
-5053
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,9 @@ cython_debug/
150150
# and can be added to the global gitignore or merged into this file. For a more nuclear
151151
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
152152
#.idea/
153+
154+
#QGIS stuff
155+
zip_build/
156+
157+
#VSCode stuff
158+
.vscode/

README.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,22 @@ A QGIS plugin for different Geovita custom processing algorithms. This plugin is
66

77
**New algorithms are added to this repo as they are developed, and new releases published!**
88

9-
Status
9+
Status and Limitations
1010
=====
1111

1212
- Implemented [REMEDY GIS RiskTool](https://github.com/norwegian-geotechnical-institute/REMEDY_GIS_RiskTool) to run from QGIS processing
13-
- It is important to read the manual for this project. Especially if you want to perform `vulnerability analysis`. This will require you to edit the polygon layers containing the `building` features (see specifications section).
13+
- It is important to read the manual for this project. Especially if you want to perform `vulnerability analysis`. This will require you to edit the polygon layers containing the `building` features (see specifications section below).
14+
- Supported filetypes: `.shp`
15+
- If you have an "in memory" layer or other fileformats you will need to save it to a `.shp` file. This is a restriction imposed by the underlaying submodule.
16+
- Projection of layers:
17+
- All layers `need the same projection` before you can run the algorithms
18+
- The algorithm does not (yet) reproject layers. This means you have to do it manually first.
1419

1520
Tools
1621
=====
17-
- **REMEDY GIS RiskTool**
22+
- **REMEDY GIS RiskTool** - These algorithms create a log directory in this location `%user%/Downloads/REMEDY`. For the moment this is hardcoded.
1823
- `Begrens Skade - Excavation` The Begrens Skade - Excavation algorithm provides a comprehensive analysis of building settlements and risks associated with subsidence and inclination.
19-
- `Begrens Skade - ImpactMap` The BegrensSkade ImpactMap alorithm calculates both short-term and long-term settlements that occur due to the establishment of a construction pit.
24+
- `Begrens Skade - ImpactMap` The BegrensSkade ImpactMap alorithm calculates both short-term and long-term settlements that occur due to the establishment of a construction pit (this alg. takes a bit of time to run, open the log and refresh it to see the logged progress).
2025
- `Begrens Skade - Tunnel` The BegrensSkade Tunnel alorithm provides a comprehensive analysis of building settlements and risks associated with subsidence and inclination due to tunnel excavation.
2126

2227
QGIS Plugin
@@ -26,6 +31,8 @@ This provider functions as a QGIS plugin (for QGIS >= 3.4) and is available via
2631

2732
The plugin adds a new group to the Processing Toolbox for "Geovita", containing sub-groups with tools and algorithms to perform different tasks.
2833

34+
If you enconter bugs of any sort, PLEASE consider reporting them through [the bugtracker at GitHub](https://github.com/danpejobo/geovita_processing_plugin/issues). Everyone benefits!
35+
2936
Specifications
3037
==============
3138

@@ -34,7 +41,7 @@ It is crucial to understand the limitations of the [REMEDY GIS RiskTool](https:/
3441
If you want to enable `vulnerability analysis` you will need some information on the buildings near the excavation/tunnel. You will need to add text fields to each feature in the building polygon layer for `Foundation`, `Structure` and `Condition`. See below for the allowed values!
3542
- Class A is the best and D the worst.
3643
- If i cell contains `-` it only means that this field only have 2 possible values.
37-
- Copy/pasete the values so they match!
44+
- Copy/paste the values so they match!
3845

3946
| Class | Foundation | Structure | Condition |
4047
|-------|---------------------------------------------------------|----------------------------------|------------------------|
@@ -44,9 +51,18 @@ If you want to enable `vulnerability analysis` you will need some information on
4451
| B | Raft | Reinforced concrete | Good |
4552
| B | Betong | B - Armert betong | B - God tilstand |
4653
| B | B - På løsmasser - Hel plate (betong, såle) | - | - |
47-
| C | Strip | Mixed | - |
48-
| C | Grunnmur | C - Tre eller varierende | - |
54+
| C | Strip | Mixed | Medium |
55+
| C | Grunnmur | C - Tre eller varierende | C - Brukbar tilstand |
4956
| C | C - På løsmasser - Stripefundament (heller) | - | - |
50-
| D | Wooden piles | Masonry | Medium |
51-
| D | Trepeler | D - Murstein eller spesiell type | C - Brukbar tilstand |
52-
| D | D - På løsmasser - Punkt- og trefundamenter (banketter) | - | - |
57+
| D | Wooden piles | Masonry | Bad |
58+
| D | Trepeler | D - Murstein eller spesiell type | D - Dårlig |
59+
| D | D - På løsmasser - Punkt- og trefundamenter (banketter) | - | - |
60+
61+
## Results
62+
The following images show some example results. Both the excavation and the tunnel algorithm produces results for short and/or longterm settlements, but uses different calculation methods. The impact map calculates and illustrate total settlements in the impaced soil around the excavation.
63+
64+
| Loaded Layers | Short term | Long term | Impact map |
65+
|---------------|------------|-----------|------------|
66+
| ![Loaded layers](resources/example-short-term-layers.png) <br><br> The symbology of the loaded layers | ![Short term](resources/example-short-term.png) <br><br> Blue hatch is the excavation. Status of corners, walls and buildings | ![Long term](resources/example-long-short-term.png) <br><br> Blue hatch is the excavation. Dark background is the depth to bedrock raster used for long term settlements. | ![Impact map](resources/example-impact-map.png) <br><br> Red hatch is the excavation. The impact map for total settlements around the excavation. |
67+
68+

__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
__date__ = '2024-01-17'
2727
__copyright__ = '(C) 2024 by DPE'
2828

29-
__version__ = "1.0.1"
29+
__version__ = "2.0.0"
3030

3131
import sys
3232
from pathlib import Path
@@ -49,6 +49,17 @@ def classFactory(iface): # pylint: disable=invalid-name
4949
submodule_dir = plugin_dir / "REMEDY_GIS_RiskTool"
5050
if str(submodule_dir) not in sys.path:
5151
sys.path.append(str(submodule_dir))
52+
53+
# The styles are provided in a styles.zip archive. As such it is neccessary to extract them the first time the plugin is loaded
54+
styles_dir = plugin_dir / "styles"
55+
if not styles_dir.is_dir():
56+
import zipfile
57+
import os
58+
# Ensure the styles directory exists
59+
# styles_dir.mkdir(parents=True, exist_ok=True)
60+
with zipfile.ZipFile(plugin_dir / 'styles.zip', 'r') as zip_ref:
61+
zip_ref.extractall(plugin_dir)
62+
os.remove(plugin_dir / 'styles.zip')
5263

5364
# Now you can import your main plugin class
5465
from .geovita_processing_plugin import GeovitaProcessingPluginPlugin

0 commit comments

Comments
 (0)