1

I have trouble to use function dissolve to dissolve polygons by field value in PyQGIS3. In PyQGIS2 this line was doing the job:

QgsGeometryAnalyzer().dissolve(ki, "name.shp", onlySelectedFeatures=False,uniqueIdField=-1, p=None)

I read on this site that processing alg should be use in PyQGIS3. But I can't find here disolve. When I run processing.algorithmHelp("native:dissolve") I can't get the list of attributes, I just get some basic information. So I don't know how to use it.

  • The easiest approach is to run the algorithm through the GUI, and then look in the Processing "history". You'll see the equivalent Python command shown there for the operation you just performed via the gui. – ndawson Dec 3 '18 at 8:48
  • Thank you men, I dont know how I didnt see that before. Please write your comment as an answer and I will approve – Anajlim Dec 3 '18 at 14:18
3

The easiest approach is to run the algorithm through the GUI, and then look in the Processing "history". You'll see the equivalent Python command shown there for the operation you just performed via the gui.

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.