Remove instantiating the laduplicated layer
This commit is contained in:
parent
ac3c44b965
commit
6cf3581014
|
@ -27,7 +27,7 @@ class ScrubLayer:
|
|||
self.layer = self.load_layer()
|
||||
self.data_count = self.layer.featureCount()
|
||||
|
||||
def duplicate_layer(self, output_path, duplicated_layer_name):
|
||||
def duplicate_layer(self, output_path):
|
||||
options = QgsVectorFileWriter.SaveVectorOptions()
|
||||
options.driverName = 'ESRI Shapefile'
|
||||
|
||||
|
@ -39,10 +39,6 @@ class ScrubLayer:
|
|||
|
||||
if duplication == QgsVectorFileWriter.NoError:
|
||||
print(f"Shapefile successfully duplicated")
|
||||
duplicated_layer = ScrubLayer(
|
||||
self.qgis_path, output_path, duplicated_layer_name)
|
||||
duplicated_layer.create_spatial_index()
|
||||
return duplicated_layer
|
||||
else:
|
||||
print(f"Error duplicating shapefile: {duplication}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user