diff --git a/scrub_layer_class.py b/scrub_layer_class.py index 5d39578..339fbad 100644 --- a/scrub_layer_class.py +++ b/scrub_layer_class.py @@ -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}")