Add uniteevaluation layer

This commit is contained in:
Alireza Adli 2024-02-15 10:47:01 -05:00
parent a654e6b38f
commit 9c97fae0f1

View File

@ -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()