Add multipart to single parts
This commit is contained in:
parent
117a474a16
commit
ca9b3c3910
@ -171,7 +171,7 @@ print(f'Creating spatial index for '
|
||||
output_layers_folder = 'C:/Users/a_adli/PycharmProjects/' \
|
||||
'hydroquebec_archetype_gispy/data/' \
|
||||
'output_data/splitted_clipped_nrcan'
|
||||
num_layers = 20
|
||||
num_layers = 120
|
||||
create_folders(output_layers_folder, num_layers)
|
||||
|
||||
splitting_intervals = clipped_nrcan_length // num_layers
|
||||
@ -347,7 +347,7 @@ processing.run("native:createspatialindex", create_index_params)
|
||||
|
||||
property_assessment_nrcan_geo, property_assessment_nrcan_geo_name = \
|
||||
load_layer(property_assessment_nrcan_geo_layer,
|
||||
'Property Assessment Layer Joined with NRCan')
|
||||
'Resulting Layer Joined with GeoIndex layer')
|
||||
print(f'{property_assessment_nrcan_geo_name} '
|
||||
f'data count: {property_assessment_nrcan_geo.featureCount()}')
|
||||
|
||||
@ -376,8 +376,26 @@ processing.run("native:createspatialindex", create_index_params)
|
||||
property_nrcan_geo_deleted_duplicates, \
|
||||
property_nrcan_geo_deleted_duplicates_name = \
|
||||
load_layer(property_nrcan_geo_deleted_duplicates_layer,
|
||||
'Property Assessment Layer Joined with NRCan')
|
||||
'Resulting layer with deleted duplicates')
|
||||
print(f'{property_nrcan_geo_deleted_duplicates_name} '
|
||||
f'data count: {property_nrcan_geo_deleted_duplicates.featureCount()}')
|
||||
|
||||
qgs.exitQgis()
|
||||
singled_parts_layer = \
|
||||
'C:/Users/a_adli/PycharmProjects/' \
|
||||
'hydroquebec_archetype_gispy/data/' \
|
||||
'output_data/singled_parts/singled_parts.shp'
|
||||
|
||||
singled_parts_params = {'INPUT': property_nrcan_geo_deleted_duplicates_layer,
|
||||
'OUTPUT': singled_parts_layer}
|
||||
processing.run("native:multiparttosingleparts", params)
|
||||
|
||||
create_index_params = {'INPUT': singled_parts_layer,
|
||||
'OUTPUT': 'Output'}
|
||||
processing.run("native:createspatialindex", create_index_params)
|
||||
|
||||
singled_parts, singled_parts_layer_name = \
|
||||
load_layer(singled_parts_layer,
|
||||
'Property Assessment Layer Joined with NRCan')
|
||||
print(f'{singled_parts_layer_name} data count: {singled_parts.featureCount()}')
|
||||
|
||||
qgs.exitQgis()
|
||||
|
Loading…
Reference in New Issue
Block a user