[QGIS-Developer] multipartToSingleParts via code

Stefano Masera stefano.masera at arpa.piemonte.it
Tue Jun 13 02:31:56 PDT 2017


Thanks Nyali. 
The reason is that if I use processing it doens't work correctly. 
In details, if I write: 

import processing 
processing.runalg("qgis:multiparttosingleparts", input1, output1) 

The plugin runs correctly only the FIRST time. 
Then, when it finishes, if I run again the plugin choosing an input2 vectorlayer, the processing algorithm doesn't see the input2 and my ouput remains output1. 
It's crazy! 
It's something like a bad refresh.. 

If you have another solution.... 

Thank you very much. 

Stefano 


----- Messaggio originale -----

Da: "Nyall Dawson" <nyall.dawson at gmail.com> 
A: "Stefano Masera" <stefano.masera at arpa.piemonte.it> 
Cc: "qgis-developer" <qgis-developer at lists.osgeo.org> 
Inviato: Martedì, 13 giugno 2017 10:20:31 
Oggetto: Re: [QGIS-Developer] multipartToSingleParts via code 

On 13 June 2017 at 17:49, Stefano Masera 
<stefano.masera at arpa.piemonte.it> wrote: 
> Hi Nyali, 
> in a few words I want to do a multipartToSingleParts (for a VectorLayer) via 
> code without using the processing module. 

Any particular reason why? 

In any case, I'd suggest copying the code used by processing: 
https://github.com/qgis/QGIS/blob/release-2_18/python/plugins/processing/algs/qgis/MultipartToSingleparts.py#L66 

Nyall 

-- 
Questo messaggio e' stato analizzato ed e' risultato non infetto. 
This message was scanned and is believed to be clean. 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170613/35528abb/attachment.html>


More information about the QGIS-Developer mailing list