<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Harrissou,<br>
<br>
Not sure if this is a solution, or if anyone has already given you
this answer, but.... if you know a classified raster has <b>50</b>
values, which you wish to style individually, you could try setting<b>:<br>
</b>
<ul>
<li><b>Colour Interpolation</b> to <b>Linear</b></li>
<li><b>Mode </b>to<b> Equal Interval</b></li>
<li><b>Classes </b>to<b> 51 </b>(one more than the Max)</li>
</ul>
<p>I have only just tested this on a raster with 4 values and its
worked for me!<br>
Hope this helps!<br>
</p>
Regards,<br>
<br>
Richard.<br>
<br>
<div class="moz-cite-prefix">On 10/01/2017 09:49, DelazJ wrote:<br>
</div>
<blockquote
cite="mid:CAECJsSr=_H3M0y63k=fHvGbo-KjxJRxGEHaf=TYUko5Gkhsz6Q@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Stéphane,<br>
<div class="gmail_extra"><br>
<div class="gmail_quote">2017-01-10 4:02 GMT+01:00 Stéphane
Henriod <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:s@henriod.info" target="_blank">s@henriod.info</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chris
<div><br>
</div>
<div>this is very nice! I indeed didn't know this trick
and will certainly use it again in the future!</div>
<div><br>
</div>
<div>However... :-)</div>
<div><br>
</div>
<div>I am currently teaching QGIS to beginners and this
for sure is not an appropriate method for them
(especially in the case you have to generate the
symbology file through a script)!</div>
<div><br>
</div>
<div>Since the user can style continuous rasters with some
"button-clicking", I believe the same option should be
available for discrete rasters as well. </div>
<div><br>
</div>
<div>I am thus wondering if anyone else than me sees it as
a priority for QGIS? If yes, how to motivate the
developers to take it for the next release and / or how
much would such a development cost? (I unfortunately
don't have the competences to do it myself)</div>
<div><br>
</div>
</blockquote>
<div>There have been some work done in the raster properties
dialog in the upcoming 3.0. I don't know if your concern
was covered though.<br>
</div>
<div>If you want, you can move the question to <a
moz-do-not-send="true"
href="http://qgis.org/en/site/getinvolved/mailinglists.html#qgis-developers-list">the
developer's list</a> and discuss whether/how this can be
implemented (and its requirements).<br>
<br>
</div>
<div>Regards,<br>
</div>
<div>Harrissou<br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Thanks again and cheers!</div>
<div><br>
</div>
<div>Stéphane</div>
<div>
<div class="h5">
<div><br>
<br>
Le mardi 10 janvier 2017, Chris House <<a
moz-do-not-send="true"
href="mailto:housec01@gmail.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:housec01@gmail.com">housec01@gmail.com</a></a>>
a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>
<div>Hi Stéphane,<br>
<br>
I don't know if this is what you are
looking for or not but I have a method
of classifying rasters by color based on
a set (standard) colors. I created a
spreadsheet that has several required
columns, value, red, green, blue...and
you can have an optional field for a
display value. So say value 1 is water
you can use that last column to name
that value so that in the QGIS layer
tree and in legend it says Water instead
of value 1. <br>
<br>
</div>
<div>save the spreadsheet as a csv and
change the extension to .txt instead of
.csv.<br>
</div>
<div><br>
</div>
I then go into the symbology section of
the raster choose singleband pseudocolor.
Use the folder to browse to your text file
and click add. There is a format for this
text file. It is below. If you need me
to email it I will do that in direct
email.<br>
<br>
# QGIS Generated Color Map Export File<br>
INTERPOLATION:EXACT<br>
-9999,0,0,0,255,NoData<br>
0,176,176,176,255,Non-Forested<br>
15,234,255,191,255,10 <= CC < 20<br>
25,187,230,149,255,20 <= CC < 30<br>
35,140,201,109,255,30 <= CC < 40<br>
45,98,176,74,255,40 <= CC < 50<br>
55,59,153,43,255,50 <= CC < 60<br>
65,0,128,0,255,60 <= CC < 70<br>
75,15,92,11,255,70 <= CC < 80<br>
85,17,61,12,255,80 <= CC < 90<br>
95,16,36,12,255,90 <= CC <= 100<br>
<br>
</div>
In my example if I don't assign a value it
gets ignored by QGIS. If you are wondering
how to assign unique colors to say 200
unique values...just script it. I have done
this and as long as you have the number of
unique values you want and to make them
unique in the script it works.<br>
<br>
</div>
I hope this helps. I know it isn't a "button"
but to be honest I like this better. If you
already knew this...well then maybe it will
help someone out in the future.<br>
<br>
</div>
--Chris<br>
<div>
<div>
<div>
<div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon,
Jan 9, 2017 at 3:00 PM, <span
dir="ltr"><<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:qgis-user-request@lists.osgeo">qgis-user-request@lists.osgeo</a><wbr>.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Send
Qgis-user mailing list
submissions to<br>
<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a></a><br>
<br>
To subscribe or unsubscribe
via the World Wide Web, visit<br>
<a
moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman">http://lists.osgeo.org/mailman</a><wbr>/listinfo/qgis-user</a><br>
or, via email, send a message
with subject or body 'help' to<br>
<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:qgis-user-request@lists.osgeo">qgis-user-request@lists.osgeo</a>.<wbr>org</a><br>
<br>
You can reach the person
managing the list at<br>
<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:qgis-user-owner@lists.osgeo.or">qgis-user-owner@lists.osgeo.or</a><wbr>g</a><br>
<br>
When replying, please edit
your Subject line so it is
more specific<br>
than "Re: Contents of
Qgis-user digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: Symbolizing a
discrete or a boolean raster
(Stéphane Henriod)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Mon, 9 Jan 2017 23:07:36
+0600<br>
From: Stéphane Henriod <<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:s@henriod.info">s@henriod.info</a></a>><br>
To: Enrico Fiore <<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:enricofiore@libero.it">enricofiore@libero.it</a></a>><br>
Cc: qgis-user <<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a></a>><br>
Subject: Re: [Qgis-user]
Symbolizing a discrete or a
boolean raster<br>
Message-ID:<br>
<<a
moz-do-not-send="true">CAK6pVBXURm_e7dRP+8SP9amPUUX0<wbr>+Cn3GVxLPNjOHhno85o2rA@mail.gm<wbr>ail.com</a>><br>
Content-Type: text/plain;
charset="utf-8"<br>
<br>
Hi<br>
<br>
thanks for following up!<br>
<br>
It actually does part of the
job!<br>
<br>
Using *Color interpretation:
Exact*, I can indeed input the
exact values I<br>
want to display (1,5 and 10)
and all other pixels are
hidden.<br>
<br>
HOWEVER,<br>
<br>
this still feels like a
workaround:<br>
<br>
- In the case of a discrete
raster with many (> 50)
unique values, I do<br>
not want to input all of
them manually<br>
- In some cases, I do not
know in advance all the unique
values of my<br>
raster<br>
- If I click on *Classify*,
QGIS will choose X values
(based on the<br>
number of classes and the
classification method
(continuous or equal<br>
interval)), which no longer
match the "exact" values of my
raster. It<br>
doesn't really make sense
to classify a discrete
rendering<br>
<br>
So I would say, we still need
a render type "discrete
raster" which offers<br>
the function to "retrieve all
unique values" (and
automatically apply a<br>
discrete color ramp)<br>
<br>
Attached a (fake) test
dataset.<br>
<br>
Thanks and cheers<br>
<br>
Stéphane<br>
<br>
<br>
Le lundi 9 janvier 2017,
Enrico Fiore <<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:enricofiore@libero.it">enricofiore@libero.it</a></a>>
a écrit :<br>
<br>
> Hi,<br>
> Sorry I can't do test,
but if you use exact in color
interpolation<br>
> parameter?<br>
><br>
> Cheers<br>
><br>
> Enrico<br>
<br>
<br>
Le lundi 9 janvier 2017,
Stéphane Henriod <<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:s@henriod.info">s@henriod.info</a></a>>
a écrit :<br>
<br>
> Hi<br>
><br>
> unfortunately this is
doing quite something
different!<br>
><br>
> If I have a raster with
10 Landcover classes
(1,2,3,4,5,6,7,8,9,10) and I<br>
> want to display only 1,5
and 10, using *Discrete *(1:
red, 5: yellow, 10:<br>
> blue) the following will
happen:<br>
><br>
> All pixels between 1 and
4 will be red<br>
> All pixels between 5 and
9 will be yellow<br>
> All pixels with 10 will
be blue<br>
><br>
> In this sense, the pixels
are indeed not interpolated,
but this still is<br>
> not the behavior I am
expecting when styling
discrete rasters.<br>
><br>
> A "style discrete raster"
function should offer the
following:<br>
><br>
> - Automatically
recover all unique values from
the raster<br>
> - Only display the
pixels to which the user has
explicitly assigned a<br>
> color<br>
><br>
> But thanks for your hint,
this can be helpful in other
cases!<br>
><br>
> Cheers<br>
><br>
> Stéphane<br>
><br>
><br>
> Le lundi 9 janvier 2017,
Enrico Fiore <<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:enricofiore@libero.it">enricofiore@libero.it</a></a><br>
>
<<a class="moz-txt-link-freetext" href="javascript:_e(%7B%7D,'cvml">javascript:_e(%7B%7D,'cvml</a>','<a
moz-do-not-send="true"><wbr><a class="moz-txt-link-abbreviated" href="mailto:enricofiore@libero.it">enricofiore@libero.it</a></a>');>>
a écrit :<br>
><br>
>> Hi,<br>
>> I think that the
solution is in the QGIS
documentation, that you can
read<br>
>> here: <a
moz-do-not-send="true"
href="http://docs.qgis.org/2.14/en/docs/user_manual/working_with_r"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://docs.qgis.org/2.14/en/d">http://docs.qgis.org/2.14/en/d</a><wbr>ocs/user_manual/working_with_r</a><br>
>>
aster/raster_properties.html#b<wbr>and-rendering<br>
>> you have to use
*Singleband pseudocolor *and
set color interpolation to<br>
>> Discrete.<br>
>><br>
>> Enrico<br>
>><br>
>><br>
>> ----Messaggio
originale----<br>
>> Da: "Stéphane
Henriod" <<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:s@henriod.info">s@henriod.info</a></a>><br>
>> Data: 09/01/2017 6.30<br>
>> A: "qgis-user"<<a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:qgis-user@lists.os">qgis-user@lists.os</a><wbr>geo.org</a>><br>
>> Ogg: [Qgis-user]
Symbolizing a discrete or a
boolean raster<br>
>><br>
>> Dear all<br>
>><br>
>> As much as I love
QGIS and use it in my everyday
life, there is one<br>
>> feature that I find
particularly annoying: the
styling of discrete rasters.<br>
>><br>
>> Basically, if I have
a raster layer consisting of
discrete landcover<br>
>> values (1: water, 2:
forest, 3: built-up), it seems
that there is no easy<br>
>> way to style it. QGIS
will assume that the data is
continuous and basically<br>
>> interpolate the color
between each value, which
leads to the following<br>
>> issues:<br>
>><br>
>> Let's say I want to
display only water and
built-up (values 1 and 3),<br>
>> water in blue and
built-up in grey. QGIS will
still display the forests,<br>
>> using a color
somewhere "between" blue and
grey. My only left option is
to<br>
>> process the raster to
actually replace all the 2
with NoData, which is<br>
>> highly unpractical...<br>
>><br>
>> Same if I have a
boolean raster (only 0 and 1
values). QGIS will by<br>
>> default make a color
ramp from 0 to 0.9999.<br>
>><br>
>> Also, the whole
rather feels like a
work-around for a missing
feature.<br>
>><br>
>> I dream of a feature
similar to this one from
ArcGIS:<br>
>> <a
moz-do-not-send="true"
href="http://resources.arcgis.com/en/help/main/10.1/index"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://resources.arcgis.com/en">http://resources.arcgis.com/en</a><wbr>/help/main/10.1/index</a>.<br>
>>
html#/representing_unique_cate<wbr>gories_such_as_land_use/009t00<wbr>000074000000/<br>
>> where all unique
values are styled
independently and where I can
easily<br>
>> skip the values I
don't want to see on my map.<br>
>><br>
>> I asked a question
here:<br>
>> <a
moz-do-not-send="true"
href="http://gis.stackexchange.com/questions/194116/qgis-style-a-d"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://gis.stackexchange.com/q">http://gis.stackexchange.com/q</a><wbr>uestions/194116/qgis-style-a-d</a><br>
>> iscrete-raster<br>
>><br>
>> and opened a ticket
here:<br>
>> <a
moz-do-not-send="true"
href="http://hub.qgis.org/issues/14845"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://hub.qgis.org/issues/148">http://hub.qgis.org/issues/148</a><wbr>45</a><br>
>><br>
>> But none has gotten
lots of attention yet... Am I
the only one to be<br>
>> annoyed by this? If
no, please raise your hand and
let's try to get some<br>
>> momentum and see how
to push this feature forward!<br>
>><br>
>> Thanks a lot in
advance!<br>
>><br>
>> Cheers<br>
>><br>
>> Stéphane<br>
>><br>
>><br>
><br>
<br>
--<br>
Stéphane Henriod<br>
CIM-Expert for GIS and Green
Economy Statistics<br>
<br>
Национальный статистический
комитет Кыргызской Республики<br>
Кыргыз Республикасынын Улуттук
статистика комитети<br>
National Statistical Committee
of the Kyrgyz Republic<br>
<br>
374 Фрунзе ул. / Frunze str.<br>
720033 Бишкек / Bishkek<br>
<br>
T +996 778 46 99 02 (KG)<br>
T <a moz-do-not-send="true"
href="tel:+49%20176%2028011050" value="+4917628011050" target="_blank">+49
176 280 11 050</a> (DE)<br>
E <a
moz-do-not-send="true"><a class="moz-txt-link-abbreviated" href="mailto:s@henriod.info">s@henriod.info</a></a><br>
W <a moz-do-not-send="true"
href="http://www.stat.kg"
rel="noreferrer"
target="_blank">http://www.stat.kg</a><br>
W3W: nightfall.into.bucket<br>
<<a moz-do-not-send="true"
href="https://map.what3words.com/nightfall.into.bucket" rel="noreferrer"
target="_blank">https://map.what3words.com/ni<wbr>ghtfall.into.bucket</a>>
// запас.союз.дружный<br>
<<a moz-do-not-send="true"
href="https://map.what3words.com/" rel="noreferrer" target="_blank">https://map.what3words.com/</a>за<wbr>пас.союз.дружный><br>
-------------- next part
--------------<br>
An HTML attachment was
scrubbed...<br>
URL: <<a
moz-do-not-send="true"
href="http://lists.osgeo.org/pipermail/qgis-user/attachments/20170109/985fd14c/attachment-0001.html"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://lists.osgeo.org/piperm">http://lists.osgeo.org/piperm</a><wbr>ail/qgis-user/attachments/2017<wbr>0109/985fd14c/attachment-0001.<wbr>html</a>><br>
-------------- next part
--------------<br>
A non-text attachment was
scrubbed...<br>
Name: landcover.zip<br>
Type: application/zip<br>
Size: 2151 bytes<br>
Desc: not available<br>
URL: <<a
moz-do-not-send="true"
href="http://lists.osgeo.org/pipermail/qgis-user/attachments/20170109/985fd14c/attachment-0001.zip"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://lists.osgeo.org/piperm">http://lists.osgeo.org/piperm</a><wbr>ail/qgis-user/attachments/2017<wbr>0109/985fd14c/attachment-0001.<wbr>zip</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
List info: <a
moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman">http://lists.osgeo.org/mailman</a><wbr>/listinfo/qgis-user</a><br>
Unsubscribe: <a
moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
rel="noreferrer"
target="_blank"><a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman">http://lists.osgeo.org/mailman</a><wbr>/listinfo/qgis-user</a><br>
<br>
------------------------------<br>
<br>
End of Qgis-user Digest, Vol
131, Issue 13<br>
******************************<wbr>************<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br>
-- <br>
</div>
</div>
<div dir="ltr">
<div>
<div class="h5">
<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 <a moz-do-not-send="true"
href="tel:+49%20176%2028011050"
value="+4917628011050" target="_blank">+49 176
280 11 050</a> (DE)</font></div>
<div><font size="2" face="arial, helvetica,
sans-serif">E <a moz-do-not-send="true"
href="mailto:s@henriod.info" target="_blank">s@henriod.info</a></font></div>
<div><font size="2" face="arial, helvetica,
sans-serif">W <a moz-do-not-send="true"
href="http://www.stat.kg" target="_blank">http://www.stat.kg</a></font></div>
</div>
</div>
<div><font size="2" face="arial, helvetica, sans-serif">W3W:
<a moz-do-not-send="true"
href="https://map.what3words.com/nightfall.into.bucket"
target="_blank">nightfall.into.bucket</a> // <a
moz-do-not-send="true"
href="https://map.what3words.com/%D0%B7%D0%B0%D0%BF%D0%B0%D1%81.%D1%81%D0%BE%D1%8E%D0%B7.%D0%B4%D1%80%D1%83%D0%B6%D0%BD%D1%8B%D0%B9"
target="_blank">запас.союз.дружный</a></font></div>
</div>
<br>
<br>
______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a moz-do-not-send="true"
href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-user"
rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<b><u>Richard McDonnell</u></b><br>
<b><small><small><small>GIS Specialist PgD GIS AssocSCSI</small></small></small></b><br>
<b><small>OPW FRM Data Management</small></b><br>
<b><small>52 Stephens Green, Dublin 2.</small></b><br>
<small><small>TEL: 01 6476543</small></small></div>
<p></p>
<a href="http://www.opw.ie/"><img src="http://www.opw.ie/en/media/opw-logo-december-2016.gif" width="405" height="225" /></a>
</body>
</html>