From 9b9218e1e45440ca41cf8a01282a5006ef3d5809 Mon Sep 17 00:00:00 2001 From: Alireza Adli Date: Wed, 31 Jul 2024 11:05:43 -0400 Subject: [PATCH] Remove the clipping of property assessment from the main workflow --- handle_varennes_ds_workflow.py | 14 --------- .../varennes_single_tasks.py | 29 +++++++++++++++---- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/handle_varennes_ds_workflow.py b/handle_varennes_ds_workflow.py index 292206f..5325523 100644 --- a/handle_varennes_ds_workflow.py +++ b/handle_varennes_ds_workflow.py @@ -8,8 +8,6 @@ create_output_folders(output_paths, output_paths_dir) geo_index = ScrubLayer(qgis_path, input_paths['GeoIndex'], 'GeoIndex') varennes_boundary = \ ScrubLayer(qgis_path, input_paths['Varennes Boundary'], 'Varennes Boundary') -property_assessment_2022 = ScrubLayer( - qgis_path, input_paths['Property Assessment 2022'], 'Property Assessment 2022') print('Processing the GeoIndex layer') @@ -32,15 +30,3 @@ geo_index_clipped = \ geo_index_clipped.create_spatial_index() print(geo_index_clipped) -print('Processing the Property Assessment 2022 layer') -print(property_assessment_2022) -property_assessment_2022.create_spatial_index() - -property_assessment_2022.clip_layer( - varennes_boundary.layer_path, - output_paths['Varennes Clipped Property Assessment']) -varennes_clipped_property_assessment = ScrubLayer( - qgis_path, output_paths['Varennes Clipped Property Assessment'], - 'Varennes Clipped Property Assessment') -varennes_clipped_property_assessment.create_spatial_index() -print(varennes_clipped_property_assessment) diff --git a/varennes_single_processes/varennes_single_tasks.py b/varennes_single_processes/varennes_single_tasks.py index f685f78..ec53f36 100644 --- a/varennes_single_processes/varennes_single_tasks.py +++ b/varennes_single_processes/varennes_single_tasks.py @@ -4,13 +4,32 @@ Project coder: Alireza Adli alireza.adli@concordia.ca """ from scrub_layer_class import * +from varennes_io_paths import * input_path = \ - 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/' \ - 'data/input_data/Geoindex_81670/mamh_usage_predo_2022_s_poly.shp' - + 'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/' \ + 'data/initial_data/ROLE2022_SHP/rol_unite_p.shp' output_path = \ - 'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/' \ - 'data/varennes_output' + 'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/data/' \ + 'varennes_output/varennes_clipped_property_assessment' + +varennes_boundary = \ + ScrubLayer(qgis_path, input_paths['Varennes Boundary'], 'Varennes Boundary') + +property_assessment_2022 = ScrubLayer( + qgis_path, input_path, 'Property Assessment 2022') + +print('Processing the Property Assessment 2022 layer') +print(property_assessment_2022) +property_assessment_2022.create_spatial_index() + +property_assessment_2022.clip_layer( + varennes_boundary.layer_path, + output_paths) +varennes_clipped_property_assessment = ScrubLayer( + qgis_path, output_paths['Varennes Clipped Property Assessment'], + 'Varennes Clipped Property Assessment') +varennes_clipped_property_assessment.create_spatial_index() +print(varennes_clipped_property_assessment)