I created some geoalgorithms with QGis and I need to use them in a Python script. By saving the layer obtained in a file having a specific path, I do not have problems. For example:
processing.runalg("modeler:esplodilinee", "buildings", "C:\prova\sides.shp") lines = iface.addVectorLayer("C:\prova\sides.shp", "poligon sides", "ogr")
But I would not use a file, but rather a temporary variable, in order to re-use it within the specific script. The description of the algorithm suggests to me that:
ALGORITHM: esplodilinee buildings OUTPUT_ALGQGISEXPLODELINES_1
So, I thought to do something like this:
OUTPUT_ALGQGISEXPLODELINES_1 = processing.runalg ("modeler: esplodilinee" "buildings", None) lines = processing.getObject (OUTPUT_ALGQGISEXPLODELINES_1)
But I get a mistake and not the desired results. Someone can help me?