From 5487d79fe9bf24e6023b65d1457874492ba62cb3 Mon Sep 17 00:00:00 2001 From: Alireza Adli Date: Wed, 24 Jul 2024 18:21:47 -0400 Subject: [PATCH] Add, fix and clip (not been tested) property assessment 2022 --- handle_varennes_ds_workflow.py | 21 +++++++++++++++++++++ varennes_io_paths.py | 10 +++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/handle_varennes_ds_workflow.py b/handle_varennes_ds_workflow.py index 9caa5c0..548ad5a 100644 --- a/handle_varennes_ds_workflow.py +++ b/handle_varennes_ds_workflow.py @@ -8,6 +8,8 @@ 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') @@ -29,3 +31,22 @@ geo_index_clipped = \ output_paths['Clipped Fixed GeoIndex'], 'Clipped Fixed GeoIndex') 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.fix_geometries(output_paths['Fixed Property Assessment 2022']) +fixed_property_assessment_2022 = ScrubLayer( + qgis_path, input_paths['Fixed Property Assessment 2022'], 'Fixed Property Assessment 2022') +fixed_property_assessment_2022.create_spatial_index() +print(fixed_property_assessment_2022) + +fixed_property_assessment_2022.clip_layer( + varennes_boundary.layer_path, + output_paths['Clipped Varennes Property Assessment']) +varennes_clipped_property_assessment = ScrubLayer( + qgis_path, output_paths['Clipped Varennes Property Assessment'], + 'Clipped Varennes Property Assessment') +varennes_clipped_property_assessment.create_spatial_index() +print(varennes_clipped_property_assessment) diff --git a/varennes_io_paths.py b/varennes_io_paths.py index 3b1dd36..2700c08 100644 --- a/varennes_io_paths.py +++ b/varennes_io_paths.py @@ -8,16 +8,20 @@ input_paths = { 'data/input_data/Geoindex_81670/mamh_usage_predo_2022_s_poly.shp', 'Varennes Boundary': 'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/' - 'data/input_data/varennes_boundary/varennes_boundary.shp' + 'data/input_data/varennes_boundary/varennes_boundary.shp', + 'Property Assessment 2022': + 'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/data/initial_data/ROLE2022_SHP/rol_unite_p.shp' } # Defining a directory for all the output data layers output_paths_dir = \ 'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/' \ - 'data/varennes_wf_output' + 'data/varennes_output' # Preparing a bedding for output data layers paths output_paths = { 'Fixed GeoIndex': '', - 'Clipped Fixed GeoIndex': '' + 'Clipped Fixed GeoIndex': '', + 'Fixed Property Assessment 2022': '', + 'Clipped Varennes Property Assessment': '' }