2

I wonder if it is possible to add new styles to a QGIS style qml file with categorized values programmatically.

I have for example a large qml style file and want to add a new definition for polygons to the existing file. The style of the polygons should be defined with a color and border color.

Is this with pyQGIS possible or are there any tutorials?

  • 1
    There's a decent blog which describes using Symbology of Vector Layers in QGIS Python Plugins which I found quite useful, just incase you haven't already seen this. I'm not sure how to add new styles via PyQGIS, but I would probably just edit the .qml style, copy/paste the properties of one symbology and change the values. – Joseph Aug 24 '15 at 12:56
  • 1
    Thank you @Joseph ! I didn't know this blog but it has a very good explanation of the QGIS symbologie. I would like to avoid to copy/paste stuff in this .qml, that's why I was looking if there are probably other methods of PyGIS. But this blog helps a lot to understand it :) – Martin Aug 25 '15 at 6:35

Your Answer

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

Browse other questions tagged or ask your own question.