Add, fix and clip (not been tested) property assessment 2022

This commit is contained in:
Alireza Adli 2024-07-24 18:21:47 -04:00
parent 80596d33fb
commit 5487d79fe9
2 changed files with 28 additions and 3 deletions

View File

@ -8,6 +8,8 @@ create_output_folders(output_paths, output_paths_dir)
geo_index = ScrubLayer(qgis_path, input_paths['GeoIndex'], 'GeoIndex') geo_index = ScrubLayer(qgis_path, input_paths['GeoIndex'], 'GeoIndex')
varennes_boundary = \ varennes_boundary = \
ScrubLayer(qgis_path, input_paths['Varennes Boundary'], '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') print('Processing the GeoIndex layer')
@ -29,3 +31,22 @@ geo_index_clipped = \
output_paths['Clipped Fixed GeoIndex'], 'Clipped Fixed GeoIndex') output_paths['Clipped Fixed GeoIndex'], 'Clipped Fixed GeoIndex')
geo_index_clipped.create_spatial_index() geo_index_clipped.create_spatial_index()
print(geo_index_clipped) 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)

View File

@ -8,16 +8,20 @@ input_paths = {
'data/input_data/Geoindex_81670/mamh_usage_predo_2022_s_poly.shp', 'data/input_data/Geoindex_81670/mamh_usage_predo_2022_s_poly.shp',
'Varennes Boundary': 'Varennes Boundary':
'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/' '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 # Defining a directory for all the output data layers
output_paths_dir = \ output_paths_dir = \
'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/' \ 'C:/Users/a_adli/PycharmProjects/varennes_gis_oo/' \
'data/varennes_wf_output' 'data/varennes_output'
# Preparing a bedding for output data layers paths # Preparing a bedding for output data layers paths
output_paths = { output_paths = {
'Fixed GeoIndex': '', 'Fixed GeoIndex': '',
'Clipped Fixed GeoIndex': '' 'Clipped Fixed GeoIndex': '',
'Fixed Property Assessment 2022': '',
'Clipped Varennes Property Assessment': ''
} }