I'm writing a QGIS plugin using PyQGIS and I have a weird problem.
When executing following line of code:
processing.runandload("qgis:createpointsalonglines", r"Clipped", 1, 1, 0, r"memory:nodes")
Seems like Qgis doesnt allow me to output to a memory layer. The function works fine if I output to a an real (not-memory) layer, but I don't want that).
Why don't I want that? Beceause in that case, I have to create the layer first, and I need to have a path to save it..
However, with other processing.runandload functions (for example "qgis:clip"or qgis:orientedminimumboundingbox), it works fine with memory layer
processing.runandload("qgis:clip", "parallel", "polygon", r"memory:Clipped")
processing.runandload("qgis:orientedminimumboundingbox", "polygon", 1, r"memory:Oriented_MBBox")
without any problem, in the same program.
Anbybody has any idea why the problem occurs with the createpointsalonglines function?
The problem would also be solved if I outputed to a real layer. But in order to create a layer, you have to define the save path... But that doesnt seem like a good option, since I would then have to ask the user to give me a save path first.. Is there a way to create a layer somewhere without having to ask where? Maybe in the plugin folder? But how do I know the path to the plugin folder?