Change paths from new_tests to tests
This commit is contained in:
parent
8dc94b1d38
commit
3333b54182
@ -33,7 +33,7 @@ print(f'{nrcan_name} data count: {nrcan.featureCount()}')
|
||||
|
||||
# Fixing geometries of the NRCan layer
|
||||
print(f'Fixing {nrcan_name} geometries')
|
||||
fixed_nrcan_0 = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/new_tests/python_fixed_05/py_fixes_05.shp'
|
||||
fixed_nrcan_0 = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/tests/python_fixed_05/py_fixes_05.shp'
|
||||
params_fixing_nrcan = {'INPUT': nrcan_0, 'METHOD': 0, 'OUTPUT': fixed_nrcan_0}
|
||||
processing.run('native:fixgeometries', params_fixing_nrcan)
|
||||
|
||||
@ -43,7 +43,7 @@ print(f'{fixed_nrcan_name} data count: {fixed_nrcan.featureCount()}')
|
||||
# Removing unnecessary parts of the NRCan layer (outside of Montreal) using
|
||||
# Administrative boundaries of the Montreal agglomeration data
|
||||
clipping_montreal_boundary_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/montreal_boundary|layername=Montreal_boundary'
|
||||
clipped_nrcan_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/new_tests/clipped_nrcan_1/clipped_nrcan_1.shp'
|
||||
clipped_nrcan_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/tests/clipped_nrcan_1/clipped_nrcan_1.shp'
|
||||
|
||||
params_clipping_nrcan = {'INPUT': fixed_nrcan_0, 'OVERLAY': clipping_montreal_boundary_layer, 'FILTER_EXPRESSION': '', 'FILTER_EXTENT': None, 'OUTPUT': clipped_nrcan_layer}
|
||||
processing.run("native:clip", params_clipping_nrcan)
|
||||
@ -68,16 +68,16 @@ print(f'{geoindex_name} data count: {geoindex.featureCount()}')
|
||||
|
||||
# Fixing the GeoIndex layer geometries
|
||||
print(f'Fixing {geoindex_name} geometries')
|
||||
fixed_geoindex_0 = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/new_tests/fixed_geoindex_9/fix_geo_9.shp'
|
||||
params_fixing_geoindex = {'INPUT': geoindex, 'METHOD': 0, 'OUTPUT': fixed_geoindex_0}
|
||||
fixed_layer_geoindex = processing.run("native:fixgeometries", params_fixing_geoindex)['OUTPUT']
|
||||
fixed_geoindex = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/tests/fixed_geoindex_9/fix_geo_9.shp'
|
||||
params_fixing_geoindex = {'INPUT': geoindex, 'METHOD': 0, 'OUTPUT': fixed_geoindex}
|
||||
processing.run("native:fixgeometries", params_fixing_geoindex)
|
||||
|
||||
fixed_geoindex, fixed_geoindex_name = load_layer(fixed_layer_geoindex, 'Fixed NRCan')
|
||||
print(f'{fixed_geoindex_name} data count: {fixed_geoindex.featureCount()}')
|
||||
fixed_geoindex_read, fixed_geoindex_name = load_layer(fixed_geoindex, 'Fixed NRCan')
|
||||
print(f'{fixed_geoindex_name} data count: {fixed_geoindex_read.featureCount()}')
|
||||
|
||||
# Removing unnecessary parts of the GeoIndex layer (outside of Montreal) using
|
||||
# Administrative boundaries of the Montreal agglomeration data
|
||||
clipped_geoindex_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/new_tests/clipped_geo_3/clipped_geo_3.shp'
|
||||
clipped_geoindex_layer = 'C:/Users/a_adli/PycharmProjects/hydroquebec_archetype_gispy/data/tests/clipped_geo_3/clipped_geo_3.shp'
|
||||
params = {'INPUT': fixed_geoindex, 'OVERLAY': clipping_montreal_boundary_layer, 'FILTER_EXPRESSION': '', 'FILTER_EXTENT': None, 'OUTPUT': clipped_geoindex_layer}
|
||||
processing.run("native:clip", params)
|
||||
print(f'Clipping {fixed_geoindex_name} is completed.')
|
||||
|
0
services_scripts/intersection.py
Normal file
0
services_scripts/intersection.py
Normal file
0
services_scripts/join_attributes_by_location.py
Normal file
0
services_scripts/join_attributes_by_location.py
Normal file
Loading…
Reference in New Issue
Block a user