diff --git a/scrub_layer_class.py b/scrub_layer_class.py index 1ea81eb..ad7107b 100644 --- a/scrub_layer_class.py +++ b/scrub_layer_class.py @@ -77,8 +77,11 @@ class ScrubLayer: def merge_layers(self, layers_path, mered_layer_path): pass - def multipart_to_singleparts(self): - pass + def multipart_to_singleparts(self, singleparts_layer_path): + QgsApplication.processingRegistry().addProvider(QgsNativeAlgorithms()) + params = {'INPUT': self.layer, + 'OUTPUT': singleparts_layer_path} + processing.run("native:multiparttosingleparts", params) def split_layer(self): pass