diff --git a/CHANGES.md b/CHANGES.md
index 65995ed..ce6ede8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -15,4 +15,4 @@
- Resulting output made available for further QGIS-modelling
- added enum - parameter to download actual GRB (adp-gbg-knw)
- added enum - parameter for od-strategy
- - changes implmented for refactored brdr
+ - changes implemented for refactored brdr
diff --git a/README.md b/README.md
index 6fbf977..2cd1907 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ You can install the latest release of `brdrQ` from
[GitHub](https://github.com/OnroerendErfgoed/brdrQ/).
### Pre-requisites
+- Script is tested for QGIS on Linux and Windows. Usage of the script on Mac is not tested, and can give errors or unexpected behaviour.
- QGIS >3.28.5: The script has been developed and tested based on QGIS 3.28.5. In older versions, the script will not work)
- brdr needs Shapely 2.0.2 or higher. This version of Shapely is available by default from QGIS 3.28.5 onwards on Windows installations. On Linux and Mac this may not be the case. If the modules are not found, the script will attempt to install both brdr and shapely from Pypi.
@@ -25,7 +26,11 @@ Follow the steps below to make the script available in QGIS Processing Toolbar
2. Choose: 'Add script to Toolbox...' (see red arrow) and select the script 'autocorrectborders.py'
-3. The tool is now available in the Processing Toolbox under 'Scripts - autocorrectborders'
+
+(While adding the script to the toolbox, the necessary python-dependencies will be installed if not yet available on your machine.
+If dependencies need to be installed, a screen like below can pop up. Please wait until installation is finished. The screen will close automatically after installation.)
+
+3. The tool 'Autocorrectborders' is now available in the Processing Toolbox under 'brdrQ'
4. Double-click on the 'Autocorrectborders' tool, and the tool opens:
@@ -88,7 +93,16 @@ The various INPUT & OUTPUT parameters are explained in more detail below. Here a
### OUTPUT
-The script generates several output layers in the layer overview. The name includes which 'RELEVANT_DISTANCE (X)' and 'OD-STRATEGY (Y)' is used
+The script generates several output layers in the layer overview:
+
+* brdrQ_RESULT_X_Y: resulting geometries after alignment
+* brdrQ_DIFF_X_Y: differences (+ and -) between original and resulting geometry
+* brdrQ_DIFF_MIN_X_Y:differences (-) between original and resulting geometry
+* brdrQ_DIFF_PLUS_X_Y:differences (+) between original and resulting geometry
+* (optional) brdrQ_RLVNT_DIFF_X_Y: relevant differences (parts to exclude), used when processing the resulting geometry
+* (optional) brdrQ_RLVNT_ISECT_X_Y: relevant intersection (parts to include), used when processing the resulting geometry
+
+The name includes which 'RELEVANT_DISTANCE (X)' and 'OD-STRATEGY (Y)' is used
### TIPS, ASSUMPTIONS & LIMITATIONS
@@ -101,7 +115,7 @@ The script generates several output layers in the layer overview. The name inclu
This allows you to gain insight into the 'deviation' and which RELEVANT_DISTANCE value can best be applied.
- The RELEVANT_DISTANCE must be chosen according to the 'deviation' of the thematic data compared to the reference layer. If the thematic data contains different geometries that show large differences in 'deviation', it is best to split the thematic data and process it separately with an appropriate RELEVANT_DISTANCE so that the RELEVANT_DISTANCE can be kept as small as possible.
-- The current version of the script assumes that both the thematic layer and reference layer are in Lambert72 (EPSG:31370)
+- The current version of the script assumes that both the thematic layer and reference layer are in the same CRS: Lambert72 (EPSG:31370) or Lambert 2008 (EPSG:3812).
- Thematic boundaries consisting of 1 or a few reference polygons are processed by the script in a few seconds. If the thematic boundaries cover a very large area (~1000 and reference polygons), it may take several minutes for the OUTPUT to be calculated. It's best to let QGIS finish this processing before proceeding
- In practice, we notice that large thematic demarcations are sometimes drawn more roughly (less precisely or inaccurately), so that a high RELEVANT DISTANCE is required to shift them to the reference file. For large areas that are drawn 'roughly', it is best to use a high RELEVANT_DISTANCE (e.g. >10 meters) and:
- OD-strategy EXCLUDE: if you want to completely exclude all public domain
@@ -114,7 +128,8 @@ The script uses `brdr`, a python-package to align thematic borders to reference
- For more information about the conceptual method/algorithm consult:
.
--
+
+
## Comments and contributions
- Please report any issues or bugs here:
diff --git a/autocorrectborders.py b/autocorrectborders.py
index c8d02fe..b2ae974 100644
--- a/autocorrectborders.py
+++ b/autocorrectborders.py
@@ -159,12 +159,12 @@ class AutocorrectBordersProcessingAlgorithm(QgsProcessingAlgorithm):
INTERMEDIATE_LAYER_GROUP = "INTERMEDIATE_LAYER_GROUP"
- LAYER_RESULT = "LAYER_RESULT"
- LAYER_RESULT_DIFF = "LAYER_RESULT_DIFF"
- LAYER_RESULT_DIFF_PLUS = "LAYER_RESULT_DIFF_PLUS"
- LAYER_RESULT_DIFF_MIN = "LAYER_RESULT_DIFF_MIN"
- LAYER_SIGNIFICANT_INTERSECTION = "LAYER_SIGNIFICANT_INTERSECTION"
- LAYER_SIGNIFICANT_DIFFERENCE = "LAYER_SIGNIFICANT_DIFFERENCE"
+ LAYER_RESULT = "brdrQ_RESULT"
+ LAYER_RESULT_DIFF = "brdrQ_DIFF"
+ LAYER_RESULT_DIFF_PLUS = "brdrQ_DIFF_PLUS"
+ LAYER_RESULT_DIFF_MIN = "brdrQ_DIFF_MIN"
+ LAYER_RELEVANT_INTERSECTION = "brdrQ_RLVNT_ISECT"
+ LAYER_RELEVANT_DIFFERENCE = "brdrQ_RLVNT_DIFF"
LAYER_REFERENCE = "LAYER_REFERENCE"
SUFFIX = ""
@@ -212,14 +212,14 @@ def name(self):
lowercase alphanumeric characters only and no spaces or other
formatting characters.
"""
- return "autocorrectBorders"
+ return "brdrqautocorrectBorders"
def displayName(self):
"""
Returns the translated algorithm name, which should be used for any
user-visible display of the algorithm name.
"""
- return self.tr("Autocorrectborders")
+ return self.tr("brdrQ - Autocorrectborders")
def group(self):
"""
@@ -618,14 +618,14 @@ def processAlgorithm(self, parameters, context, feedback):
)
if self.SHOW_INTERMEDIATE_LAYERS:
self.create_temp_layer(
- self.LAYER_SIGNIFICANT_INTERSECTION,
+ self.LAYER_RELEVANT_INTERSECTION,
self.INTERMEDIATE_LAYER_GROUP,
self.ID_THEME_GLOBAL,
"simple green fill",
False,
)
self.create_temp_layer(
- self.LAYER_SIGNIFICANT_DIFFERENCE,
+ self.LAYER_RELEVANT_DIFFERENCE,
self.INTERMEDIATE_LAYER_GROUP,
self.ID_THEME_GLOBAL,
"simple red fill",
@@ -766,7 +766,7 @@ def processAlgorithm(self, parameters, context, feedback):
)
if self.SHOW_INTERMEDIATE_LAYERS:
self.add_geom_to_temp_layer(
- self.LAYER_SIGNIFICANT_INTERSECTION,
+ self.LAYER_RELEVANT_INTERSECTION,
self.geom_shapely_to_qgis(
self.geom_from_dict(
relevant_intersection_merged, id_theme_global
@@ -775,7 +775,7 @@ def processAlgorithm(self, parameters, context, feedback):
id_theme_global,
)
self.add_geom_to_temp_layer(
- self.LAYER_SIGNIFICANT_DIFFERENCE,
+ self.LAYER_RELEVANT_DIFFERENCE,
self.geom_shapely_to_qgis(
self.geom_from_dict(relevant_diff_merged, id_theme_global)
),
@@ -927,12 +927,12 @@ def prepare_parameters(self, parameters):
self.PROCESS_MULTI_AS_SINGLE_POLYGONS = parameters[
"PROCESS_MULTI_AS_SINGLE_POLYGONS"
]
- self.SUFFIX = "_" + str(self.RELEVANT_DISTANCE) + "_OD_" + str(self.OD_STRATEGY)
- self.LAYER_SIGNIFICANT_INTERSECTION = (
- self.LAYER_SIGNIFICANT_INTERSECTION + self.SUFFIX
+ self.SUFFIX = "_" + str(self.RELEVANT_DISTANCE) + "_OD_" + str(self.OD_STRATEGY.name)
+ self.LAYER_RELEVANT_INTERSECTION = (
+ self.LAYER_RELEVANT_INTERSECTION + self.SUFFIX
)
- self.LAYER_SIGNIFICANT_DIFFERENCE = (
- self.LAYER_SIGNIFICANT_DIFFERENCE + self.SUFFIX
+ self.LAYER_RELEVANT_DIFFERENCE = (
+ self.LAYER_RELEVANT_DIFFERENCE + self.SUFFIX
)
self.LAYER_RESULT = self.LAYER_RESULT + self.SUFFIX
self.LAYER_RESULT_DIFF = self.LAYER_RESULT_DIFF + self.SUFFIX
diff --git a/docs/figures/input.png b/docs/figures/input.png
index 7524f25..9703a1c 100644
Binary files a/docs/figures/input.png and b/docs/figures/input.png differ
diff --git a/docs/figures/python_install.png b/docs/figures/installation-step-2c.png
similarity index 100%
rename from docs/figures/python_install.png
rename to docs/figures/installation-step-2c.png
diff --git a/docs/figures/installation-step-3.png b/docs/figures/installation-step-3.png
index 551cea7..d4790fd 100644
Binary files a/docs/figures/installation-step-3.png and b/docs/figures/installation-step-3.png differ
diff --git a/docs/figures/installation-step-4.png b/docs/figures/installation-step-4.png
index f22bc55..fb557c3 100644
Binary files a/docs/figures/installation-step-4.png and b/docs/figures/installation-step-4.png differ
diff --git a/docs/figures/output.png b/docs/figures/output.png
index 0476de7..c8017b5 100644
Binary files a/docs/figures/output.png and b/docs/figures/output.png differ