Tuesday 23 October 2018

Automatically style raster using unique values in QGIS?



In ArcMap, it is possible to automatically calculate the unique values for a raster and then apply a different style to each unique value (see 1st image).


However, in QGIS, I have to manually add values for styling when using the "Singleband pseudocolor" style (see 2nd image). Is there a way of auto-populating the unique values like ArcMap does?


ArcMap:


ArcMap raster symbology unique values


QGIS (how to auto-populate the value list with unique values?):


QGIS raster stlying



Answer



For those still looking for this. Unique raster values have been added to QGIS 3. "Added by Nyall Dawson about 1 year ago


[FEATURE] Allow classifying paletted renderer using unique values from a raster layer


Adds an easy way to style discrete rasters such as landuse classes using the Paletted renderer. Just select the Paletted renderer, pick a band, then hit the "Add Unique Values" button. The unique pixel values will be fetched from the layer and a color assigned to each using the currently selected color ramp."



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...