Hi <div><br></div><div>unfortunately this is doing quite something different!</div><div><br></div><div>If I have a raster with 10 Landcover classes (1,2,3,4,5,6,7,8,9,10) and I want to display only 1,5 and 10, using <b>Discrete </b>(1: red, 5: yellow, 10: blue) the following will happen:</div><div><br></div><div>All pixels between 1 and 4 will be red</div><div>All pixels between 5 and 9 will be yellow</div><div>All pixels with 10 will be blue</div><div><br></div><div>In this sense, the pixels are indeed not interpolated, but this still is not the behavior I am expecting when styling discrete rasters.</div><div><br></div><div>A "style discrete raster" function should offer the following:</div><div><ul><li>Automatically recover all unique values from the raster</li><li>Only display the pixels to which the user has explicitly assigned a color</li></ul></div><div>But thanks for your hint, this can be helpful in other cases!</div><div><br></div><div>Cheers</div><div><br>Stéphane</div><div><br></div><div><br>Le lundi 9 janvier 2017, Enrico Fiore <<a href="mailto:enricofiore@libero.it">enricofiore@libero.it</a>> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,<br>I think that the solution is in the QGIS documentation, that you can read here: <a href="http://docs.qgis.org/2.14/en/docs/user_manual/working_with_raster/raster_properties.html#band-rendering" target="_blank">http://docs.qgis.org/2.14/en/<wbr>docs/user_manual/working_with_<wbr>raster/raster_properties.html#<wbr>band-rendering</a><br>you have to use <strong>Singleband pseudocolor </strong>and set color interpolation to Discrete.<br><br>Enrico<br></div><br>
<br>
<blockquote>
----Messaggio originale----<br>
Da: "Stéphane Henriod" <<a href="javascript:_e(%7B%7D,'cvml','s@henriod.info');" target="_blank">s@henriod.info</a>><br>
Data: 09/01/2017 6.30<br>
A: "qgis-user"<<a href="javascript:_e(%7B%7D,'cvml','qgis-user@lists.osgeo.org');" target="_blank">qgis-user@lists.<wbr>osgeo.org</a>><br>
Ogg: [Qgis-user] Symbolizing a discrete or a boolean raster<br>
<br>
Dear all<div><br></div><div>As much as I love QGIS and use it in my everyday life, there is one feature that I find particularly annoying: the styling of discrete rasters.</div><div><br></div><div>Basically, if I have a raster layer consisting of discrete landcover values (1: water, 2: forest, 3: built-up), it seems that there is no easy way to style it. QGIS will assume that the data is continuous and basically interpolate the color between each value, which leads to the following issues:</div><div><br></div><div>Let's say I want to display only water and built-up (values 1 and 3), water in blue and built-up in grey. QGIS will still display the forests, using a color somewhere "between" blue and grey. My only left option is to process the raster to actually replace all the 2 with NoData, which is highly unpractical...</div><div><br></div><div>Same if I have a boolean raster (only 0 and 1 values). QGIS will by default make a color ramp from 0 to 0.9999.</div><div><br></div><div>Also, the whole rather feels like a work-around for a missing feature.</div><div><br></div><div>I dream of a feature similar to this one from ArcGIS: <a href="http://resources.arcgis.com/en/help/main/10.1/index.html#/representing_unique_categories_such_as_land_use/009t00000074000000/" target="_blank">http://resources.<wbr>arcgis.com/en/help/main/10.1/<wbr>index.html#/representing_<wbr>unique_categories_such_as_<wbr>land_use/009t00000074000000/</a> where all unique values are styled independently and where I can easily skip the values I don't want to see on my map.</div><div><br></div><div>I asked a question here:</div><div><a href="http://gis.stackexchange.com/questions/194116/qgis-style-a-discrete-raster" target="_blank">http://gis.stackexchange.com/<wbr>questions/194116/qgis-style-a-<wbr>discrete-raster</a></div><div><br></div><div>and opened a ticket here:</div><div><a href="http://hub.qgis.org/issues/14845" target="_blank">http://hub.qgis.org/issues/<wbr>14845</a></div><div><br></div><div>But none has gotten lots of attention yet... Am I the only one to be annoyed by this? If no, please raise your hand and let's try to get some momentum and see how to push this feature forward!</div><div><br></div><div>Thanks a lot in advance!</div><div><br>Cheers</div><div><br></div><div>Stéphane</div><br><br>-- <br><div dir="ltr"><div><font size="2" face="arial, helvetica, sans-serif">Stéphane Henriod</font></div><div><font size="2" face="arial, helvetica, sans-serif">CIM-Expert for GIS and Green Economy Statistics</font></div><div><font size="2" face="arial, helvetica, sans-serif"><br></font></div><div><font size="2" face="arial, helvetica, sans-serif">Национальный статистический комитет Кыргызской Республики</font></div><div><font size="2" face="arial, helvetica, sans-serif">Кыргыз Республикасынын Улуттук статистика комитети</font></div><div><font size="2" face="arial, helvetica, sans-serif">National Statistical Committee of the Kyrgyz Republic</font></div><div><font size="2" face="arial, helvetica, sans-serif"><br></font></div><div><font size="2" face="arial, helvetica, sans-serif">374 Фрунзе ул. / Frunze str.</font></div><div><font size="2" face="arial, helvetica, sans-serif">720033 Бишкек / Bishkek</font></div><div><font size="2" face="arial, helvetica, sans-serif"><br></font></div><div><font size="2" face="arial, helvetica, sans-serif">T   +996 778 46 99 02 (KG)</font></div><div><font size="2" face="arial, helvetica, sans-serif">T   +49 176 280 11 050 (DE)</font></div><div><font size="2" face="arial, helvetica, sans-serif">E    <a href="javascript:_e(%7B%7D,'cvml','s@henriod.info');" target="_blank">s@henriod.info</a></font></div><div><font size="2" face="arial, helvetica, sans-serif">W   <a href="http://www.stat.kg" target="_blank">http://www.stat.kg</a></font></div><div><font size="2" face="arial, helvetica, sans-serif">W3W: <a href="https://map.what3words.com/nightfall.into.bucket" target="_blank">nightfall.into.bucket</a>  //  <a href="https://map.what3words.com/запас.союз.дружный" target="_blank">запас.союз.дружный</a></font></div></div><br>
<br>
</blockquote><br>
</blockquote></div><br><br>-- <br><div dir="ltr"><div><font face="arial, helvetica, sans-serif" size="2">Stéphane Henriod</font></div><div><font face="arial, helvetica, sans-serif" size="2">CIM-Expert for GIS and Green Economy Statistics</font></div><div><font face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2">Национальный статистический комитет Кыргызской Республики</font></div><div><font face="arial, helvetica, sans-serif" size="2">Кыргыз Республикасынын Улуттук статистика комитети</font></div><div><font face="arial, helvetica, sans-serif" size="2">National Statistical Committee of the Kyrgyz Republic</font></div><div><font face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2">374 Фрунзе ул. / Frunze str.</font></div><div><font face="arial, helvetica, sans-serif" size="2">720033 Бишкек / Bishkek</font></div><div><font face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2">T   +996 778 46 99 02 (KG)</font></div><div><font face="arial, helvetica, sans-serif" size="2">T   +49 176 280 11 050 (DE)</font></div><div><font face="arial, helvetica, sans-serif" size="2">E    <a href="mailto:s@henriod.info" target="_blank">s@henriod.info</a></font></div><div><font face="arial, helvetica, sans-serif" size="2">W   <a href="http://www.stat.kg" target="_blank">http://www.stat.kg</a></font></div><div><font face="arial, helvetica, sans-serif" size="2">W3W: <a href="https://map.what3words.com/nightfall.into.bucket" target="_blank">nightfall.into.bucket</a>  //  <a href="https://map.what3words.com/запас.союз.дружный" target="_blank">запас.союз.дружный</a></font></div></div><br>