<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Oops, forgot to copy the list…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Stefan Blumentrath
<br>
<b>Sent:</b> mandag 6. november 2017 13.15<br>
<b>To:</b> 'Žofie Cimburová' <zoficimburova@gmail.com><br>
<b>Subject:</b> RE: [GRASS-user] i.spec.unmix - scale results to 0-100%<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">My guess would be that you have to normalize the data for every layer in each pixel, like<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">r.mapcalc expression=”water_n= float (water-min(water, builtup, forest))/ float (max(water, builtup, forest)-min(water,
 builtup, forest))\<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">builtup _n= float (builtup-min(water, builtup, forest))/ float (max(water, builtup, forest)-min(water, builtup, forest))\<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">water_n=float(forest-min(water, builtup, forest))/ float (max(water, builtup, forest)-min(water, builtup, forest))”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Or something like that…<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Stefan<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> grass-user [<a href="mailto:grass-user-bounces@lists.osgeo.org">mailto:grass-user-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Žofie Cimburová<br>
<b>Sent:</b> mandag 6. november 2017 11.18<br>
<b>To:</b> Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>><br>
<b>Cc:</b> GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br>
<b>Subject:</b> Re: [GRASS-user] i.spec.unmix - scale results to 0-100%<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">On Fri, Nov 3, 2017 at 5:06 PM, Markus Neteler <<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal">On Fri, Nov 3, 2017 at 11:10 AM, Žofie Cimburová<br>
<<a href="mailto:zoficimburova@gmail.com">zoficimburova@gmail.com</a>> wrote:<br>
> Hi,<br>
> I am using i.spec.unmix for spectral unmixing of Sentinel-2 imagery. I<br>
> define 6 endmembers and the results look pretty fine, but when I add the<br>
> output maps up, they don't sum up to 100%, but rather anything from 23 till<br>
> 67...<br>
> I tried to linearly scale the output maps to 0-100% and then add them up,<br>
> but this does not sum up to 100% either.<br>
> In the manual there is a small comment "# todo: reclass to 0..100%".<br>
<br>
There was a change for this but probably not catching the problem:<br>
<br>
On Tue, Jul 4, 2017 at 10:53 PM,  <<a href="mailto:svn_grass@osgeo.org">svn_grass@osgeo.org</a>> wrote:<br>
> Author: ychemin<br>
> Date: 2017-07-04 13:53:58 -0700 (Tue, 04 Jul 2017)<br>
> New Revision: 71240<br>
><br>
> Modified:<br>
>    grass-addons/grass7/imagery/i.spec.unmix/main.c<br>
> Log:<br>
> trying to rescale from 0-256 to 0-100, with according colour scheme<br>
<br>
<br>
<br>
> How do I perform the reclassification manually?<br>
<br>
Probably<br>
<a href="https://grass.osgeo.org/grass72/manuals/r.rescale.html" target="_blank">https://grass.osgeo.org/grass72/manuals/r.rescale.html</a><br>
but it would be better to get the Addon completed.<o:p></o:p></p>
</blockquote>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">This does not solve my problem - the output maps are not scaled to 0-255. The ranges of my output maps are e.g. Map 1-water: 0-34, Map 2-builtup: 0-65, Map 3-forest:0-13, ....  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I tried to r.rescale each map to 0-100, but they then don't sum up to 100 either. Is there probably different scaling for each output map? Or how else can I interpret the results if not in form of ratios?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Zofie<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</body>
</html>