[QGIS-Developer] multipartToSingleParts via code

Ben Hur Pintor bnhr.dev at gmail.com
Mon Jun 12 20:24:38 PDT 2017


Hi Stefano.

Correct me if I'm wrong but my understanding is that you want to be able to
call "multiparttosingleparts" in his code the same way you call dissolve.

Something like:

from qgis.xxx import *
xxx = YYY
xxx.multiparttosingleparts(input, output)

Have you tried looking at the API?

I haven't used the qgis processing algorithims in my Python code that way
since they already work fine the way they do now. May I know why you'd like
such a use case?


Regards,

Ben Hur

On Tue, Jun 13, 2017 at 5:33 AM, Nyall Dawson <nyall.dawson at gmail.com>
wrote:

> On 13 June 2017 at 01:01, Stefano Masera
> <stefano.masera at arpa.piemonte.it> wrote:
> > Hi list,
> > I want to use the 'multiPartToSinglePart' script via code for my plugin.
> > I can use it importing processing like this:
> >
> > import processing
> > processing.runalg("qgis:multiparttosingleparts", input, output)
> >
> > but I wan't to use it in a different way, like I already do with the
> > 'dissolve' script:
> >
> > from qgis.analysis import *
> > analyzer = QgsGeometryAnalyzer()
> > analyzer.dissolve(input, output)
> >
> > (even if I could write:
> > import processing
> > processing.runalg("qgis:dissolve",input,output)
> > )
> >
> > Is it possible?
>
> Sorry, I don't understand exactly what it is you're wanting to do. Can
> you clarify?
>
> Nyall
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
---

*Engr. Ben Hur S. Pintor*
*Research Associate*
Phil-LiDAR 2 Project 5: REMap
UP Training Center for Applied Geodesy and Photogrammetry


*Juris Doctor*
College of Law
*University of the Philippines Diliman*
Quezon City 1101, PHL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170613/bc1ad630/attachment.html>


More information about the QGIS-Developer mailing list