diff --git a/mtl_buildings_workflow.py b/mtl_buildings_workflow.py index 6442b8d..c8c5f7d 100644 --- a/mtl_buildings_workflow.py +++ b/mtl_buildings_workflow.py @@ -88,4 +88,24 @@ processing.run("native:createspatialindex", params_create_index_geoindex) print(f'Creating spatial index for {clipped_geoindex_name} is completed.') +# Adding the Property Assessment (uniteevaluation) dataset + +uniteevaluationfonciere_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/uniteevaluationfonciere/uniteevaluationfonciere.shp' + +loaded_uniteevaluationfonciere_layer, uniteevaluationfonciere_layer_name = load_layer(uniteevaluationfonciere_layer, 'uniteevaluationfonciere') +print(f'{uniteevaluationfonciere_layer_name} data count: {loaded_uniteevaluationfonciere_layer.featureCount()}') + +clipped_nrcan_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/tests/clipped_nrcan_10/clipped_nrcan_10.shp' +clipped_uniteevaluation_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/tests/clipped_uniteevaluation/clipped_uniteevaluation.shp' + +params_clip_uniteevaluation = {'INPUT': uniteevaluationfonciere_layer, 'OVERLAY': clipped_nrcan_layer, 'FILTER_EXPRESSION': '', 'FILTER_EXTENT': None, 'OUTPUT': clipped_uniteevaluation_layer} +processing.run("native:clip", params_clip_uniteevaluation) + +print(f'Clipping the {uniteevaluationfonciere_layer_name} is completed.') + +params_create_index_uniteevaluationfonciere = {'INPUT': clipped_uniteevaluation_layer, 'OUTPUT': 'Output'} +indexed_layer = processing.run("native:createspatialindex", params_create_index_uniteevaluationfonciere) + +print(f'Creating spatial index for {uniteevaluationfonciere_layer_name} is completed.') + qgs.exitQgis() \ No newline at end of file