[Qgis-developer] How can I program a raster legend using PyQGIS?

René Estrella perro1255 at hotmail.com
Wed Jan 16 09:14:43 EST 2008




>
>On Jan 15, 2008 9:45 PM, René Estrella <perro1255 at hotmail.com> wrote:
>> I'm trying to program a kind of raster layer component using PyQGIS
>> either
>> as a plugin or as a standalone application.  Which classes of QGIS API do
>> you recommend me to use?  Do you suggest me to use QgsColorTable in
>> conjunction with QgsRasterLayer to obtain the symbology of the raster
>> layer
>> and display it in a QgsLegend?  Are there any other classes do I have to
>> know about for this purpose?  Aditionally, if you can direct me to a good
>> documentation resource to learning how to use PyQGIS (very
>> beginner-oriented) I would be very thankful to you.

>Hi,
>I don't get what you mean by "raster layer component"...

Hi, Martin.  Thanks so much for your answer.  There's an error in my last
post.  I need to develop a raster LEGEND component, not a raster layer
component.  Excuse me for that mistake.  What I particularly need is to
display several Ascii Grid Rasters in the map canvas of QGIS, and, attached
to it a legend component showing the list of layers loaded and for each
layer the symbology indicating the colors corresponding to each pixel value
of the raster layer.  I mean, something similar to the vector layer legend,
where you can categorize the information and assign a color for each
category, and things like those.  It seems it's not possible to obtain such
a legend for an ascii grid raster layer with the current functionality
included in QGIS.  Because of that, I think the only way to do that is to
develop a plugin for producing the legend.  Am I right or there is something
more I should know about this topic?  Could you give me some guidance to
start developing such a component?

Thanks again and best regards.

René Estrella
-- 
View this message in context: http://www.nabble.com/How-can-I-program-a-raster-legend-using-PyQGIS--tp14846130p14881331.html
Sent from the qgis-developer mailing list archive at Nabble.com.




More information about the Qgis-developer mailing list