[Qgis-user] Delete a class from QgsPalettedRasterRenderer

PIERRE Sylvain sylvain.pierre at bas-rhin.fr
Mon Nov 23 23:10:07 PST 2020


Hi List,
I want to remove some class from a QgsPalettedRasterRenderer in a python script.
I got the renderer and classes with :
renderer = myLayer.renderer()
clas = renderer.classes()
I can iterate classes, modify label and so on.
But I don’t find any tips to delete a class as I can do in the ui.

Any idea?

Thanks



→  Sylvain PIERRE
         Chef de projet système d’information
         Direction des Systèmes d’Information
         Service Projets et Applications Numériques
       Conseil Départemental du Bas-Rhin
[cid:image001.jpg at 01D6C239.36F63D80]<http://www.bas-rhin.fr/>
         Hôtel du Département
         1 place du Quartier Blanc 67964 Strasbourg Cedex 9
         Tél : 03 88 76 68 88 - mobile :
         Mobile :
         Email : sylvain.pierre at bas-rhin.fr<mailto:sylvain.pierre at bas-rhin.fr>
         www.bas-rhin.fr<http://www.bas-rhin.fr/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201124/c0c3e1bf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 4601 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20201124/c0c3e1bf/attachment-0001.jpg>


More information about the Qgis-user mailing list