diff --git a/mtl_buildings_workflow.py b/mtl_buildings_workflow.py index b3abe56..bcee528 100644 --- a/mtl_buildings_workflow.py +++ b/mtl_buildings_workflow.py @@ -1,7 +1,8 @@ from qgis.core import QgsApplication, QgsVectorLayer, QgsProject, QgsProcessingFeedback from qgis.analysis import QgsNativeAlgorithms -import processing, os -from services_scripts.basic_functions import create_folders +import processing +import os +from services_scripts.basic_functions import create_folders, find_shp_files # This function loads a layer. It's used to count the data records @@ -167,4 +168,15 @@ print("Pairwise Clipping is completed.") # Finally, we merge all the clipped layers to make the # pairwise clipped Property Assessment layer +# First we extract all the .shp files (clipped layers) from each folder +pairwise_clipped_layers_path = find_shp_files(clipped_layers_folder) + +pairwise_clipped_property_assessment = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/output_data/pairwise_clipped_property_assessment/pairwise_clipped.shp' + +merging_params = {'LAYERS': pairwise_clipped_layers_path, + 'CRS': None, + 'OUTPUT': pairwise_clipped_property_assessment} + +processing.run("native:mergevectorlayers", merging_params) + qgs.exitQgis() \ No newline at end of file