I have a vectorlayer which contains some features and I'm having problems representing them because they are being overlapped with an incorrect order. They have a field that numerate each feature so it could be easy to do.

I don't know if there's a better way to solve the problem but I wish to change the Symbol Levels and I couldn't find any function related with that in the QgsSymbol Class.

In the following image you can see where's the parameter that I want to change with code.

Symbol Levels

Any idea?

closed as off-topic by ahmadhanb, Andre Silva, LaughU, Jochen Schwarze, nmtoken Jan 10 at 9:21

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – ahmadhanb, Andre Silva, LaughU, Jochen Schwarze, nmtoken
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Did you try Layer Rendering --> Control feature rendering order in Symbology menu? – MrXsquared Jan 8 at 17:43
  • That works too but I don't want to do it manually, I want to code it in Python. I didn't know that way to do it so I'm going to search information about it. – Manu Jan 8 at 18:05
  • Ah, misunderstood it. – MrXsquared Jan 8 at 18:23
  • @Manu if you could calculate a symbol level value you can store in your data table you could manipulate that instead, which gets used by the map – DPSSpatial Jan 8 at 18:47

Browse other questions tagged or ask your own question.