<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 21/03/2024 à 01:43, Michael Sumner a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAAcGz9-OkojtauLt3hbWvT0sHEc4YmJZXTdFw363Jdbhif_MKA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> And, can index be *value* in any contexts?<br>
<br>
If you use a raster with a signed data type, that could be
negative <br>
values (assuming I understand your question)<br>
<br>
</blockquote>
<div><br>
</div>
<div><br>
</div>
<div>ah I see, arbitrary integer values map to a colour
0:(n-1) colours, match the ordered n values in the raster -
that is "value" in the way I was thinking ( I had in mind
more general cases like interval ranges, but that's another
level up)</div>
<div><br>
</div>
<div>I might be entirely messing up the concept ... will check
my take by experiment. <br>
</div>
</div>
</div>
</blockquote>
<p>It was wrong about negative values. As this script ultimately
writes a GDALColorTable, you must use >=0 indices.</p>
<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>