Feature request #47

raster legend in map composer

Added by Redmine Admin almost 15 years ago. Updated over 9 years ago.

Assignee:Marco Hugentobler
Pull Request or Patch supplied:No Resolution:fixed
Easy fix?:No Copied to github as #:10106


The map composer misses a raster legend.


#1 Updated by leo-lami - about 13 years ago

We need a continuos (rx. for dtm raster) or category value legend (best if it is possible choise it) about all the raster load in the map canvas,
Ask me if you need same other information.

#2 Updated by Tim Sutton over 12 years ago

On second thoughts this is probably handled using the enhancement type and not a fake milestone. Returning to 1.0.1 milestone, please ignore last milestone change. Also changed assigned to tim since Radim is no longer active in QGIS.

#3 Updated by Marco Hugentobler over 12 years ago

I think that this is now more a raster problem than a composer problem. The composer now shows the raster icon from the legend. Once the raster layer provides a detailed raster legend (e.g. classification values), composer can also do so.

#4 Updated by ersts - over 12 years ago

This actually is already possible

For Paletted, Pseudo and Freakout it would looks something like this, get the current shader (only one per raster layer)
*myRasterShader = RasterLayer->getRasterShader()

loop through all values you want to show in the legend
for(int runner = RasterLayer->getMinimumValue(band a); runner <= RasterLayer->getMaximumValue(band a); runner++) {
if(myRasterShader->generateShadedValue((double)runner, &red, &green, &blue) {
//set the color of your object
color_my_legend_item(new QColor(red, green, blue))

#5 Updated by Paolo Cavallini over 12 years ago

Then would it be fasible adding it as a last minute 1.0 feature? It would be great to have it

#6 Updated by aprasad - over 12 years ago

Please implement raster legend display (so that you can define custom breaks of cell values and view them in the colors you want - like is available in ArcView 3.x) - I feel qGIS will not impresss new users if it does not have this basic functionality in place.

#7 Updated by Paolo Cavallini over 9 years ago

  • Resolution set to fixed

Thanks Marco

#8 Updated by Paolo Cavallini over 9 years ago

  • Status changed from Open to Resolved

#9 Updated by Anita Graser over 9 years ago

  • Pull Request or Patch supplied set to No
  • Status changed from Resolved to Closed

Also available in: Atom PDF