How to save pyqgis QgsGeometryAnalyzer.dissolve output in memory (temporal layer)?

Usage example:

from qgis.analysis import *
shp_path = "C:\shape_file.shp"
QgsGeometryAnalyzer().dissolve(layer, shp_path, onlySelectedFeatures=False, uniqueIdField=-1)

These algorithms are old and unmaintained. They can produce only shapefiles. They have been dropped in QGIS 3 in favor of the Processing framework, in which you can select the output format.

So you should better not use this class in QGIS 2 and move now to Processing, it will be easier when you will move to QGIS 3.

import processing
v.dissolve - Dissolves boundaries between adjacent areas sharing a common category number or attribute.--->grass7:v.dissolve

How to use Processing from Python https://docs.qgis.org/2.18/en/docs/user_manual/processing/console.html

  • Ok, I will use processing instead of qgis.analysis. – Mr. Che Dec 22 '17 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.