8

Is there a way to get similar raster styling in QGIS as ArcGIS does with classified raster data based on percentile scores? In other words, I want an equal number of pixels in one color for my entire raster. I already tried all settings for pseudocolor in QGIS. QGIS 2.12.1 Windows

In ArcGIS this functionality can be found in Layer properties - Symbology - Classified - Classify - Quantile

This is easy with shapefiles but not evident to me with raster files

UPDATE: I started working on a plugin but ran into problems: Quantile in QGIS python Plugin

enter image description here

Dialog window in arcGIS

Equal Interval histogram

Classes in Histogram for equal interval setting

Quantile Histogram

classes in histogram for quantile (Equal number of pixels in class) setting

RutgerH
  • 3,285
  • 3
  • 27
  • 55

1 Answers1

3

The singleband pseudocolor dialogue has an 'equal interval' option on which you can set the # of classes and the colours themselves:

enter image description here

Is that what you're after?

DPSSpatial_BoycottingGISSE
  • 18,790
  • 4
  • 66
  • 110
  • thanks for your comment. I want to set the intervals such that the amount of pixels in each bin is the same. I believe this is a percentile or quantile approach. I cuurently calculate the quantile (5 classes) scores using python and copy them into Qgis but this should be easier. – RutgerH Mar 21 '16 at 20:37
  • I can't see what you're describing in ArcMap... are you able to post a screen shot of what you're after? When I use the same settings dialogue box you're describing, it's doing the same thing the QGIS dialogue is doing above... – DPSSpatial_BoycottingGISSE Mar 21 '16 at 20:44
  • Ah so it seems QGIS lacks a 'quantile' method... that would be what you're after then? – DPSSpatial_BoycottingGISSE Mar 21 '16 at 21:08
  • exactly, plugin or workaround is OK as well – RutgerH Mar 21 '16 at 21:14
  • 2
    Seems like PostGIS Raster might have a solution, at least for figuring out the breaks: http://postgis.net/docs/RT_ST_Quantile.html given the result, you could set your symbols manually... but yeah, maybe a feature request for QGIS to have a few more raster symbology methods? – DPSSpatial_BoycottingGISSE Mar 21 '16 at 21:20
  • 2
    There's also a GRASS solution: https://grass.osgeo.org/grass70/manuals/r.quantile.html to at least compute the breaks... – DPSSpatial_BoycottingGISSE Mar 21 '16 at 21:20
  • @RutgerH I tried the GRASS r.quantile on my raster (without a GRASS mapset you can run GRASS tools on local data with QGIS W/ GRASS) but I can't figure out how to interpret the output... more to come... – DPSSpatial_BoycottingGISSE Mar 21 '16 at 21:58
  • Amyone already working on a plugin for this? – RutgerH Mar 23 '16 at 03:47
  • 2
    I haven't seen anything, but I would suggest a feature request for QGIS... seems like a logical addition to the symbol categories... – DPSSpatial_BoycottingGISSE Mar 23 '16 at 13:36
  • @RutgerH I think I figured out how to apply this output but I need to find a raster with a better range of values to apply it to... – DPSSpatial_BoycottingGISSE Apr 03 '16 at 14:32