<html style="direction: ltr;">
<head>
<meta content="text/html; charset=windows-1255"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="preferred-charset"
bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">It looks like something in your
formatting has cut our part of the message.<br>
In any case, in a bash script I would do:<br>
<br>
MAX=`r.univar -g map=<your raster> | grep max | cut -d '='
-f 2`<br>
r.mapcalc "newrast = myrast*100/$MAX"<br>
<br>
On 04/25/2013 05:22 PM, simogeo wrote:<br>
</div>
<blockquote cite="mid:1366899766355-5049643.post@n6.nabble.com"
type="cite">
<pre wrap="">Hi,
I'm able to get the max value of a raster map using the following command :
which return max = 45784578
and I use this value to create another raster like so :
Returns :
which appears to be correct
My question is : Is there a way to do it dynamically? I want to automatise
that into a bash script.
I've tried : /r.mapcalc "newrast = myrast * 100 / max(myrast)"/ expecting
max(myrast) returns here 45784578 (max value) with no success.
returns :
which appears to be incorrect.
Any help would be appreciated.
Thanks,
simon
--
View this message in context: <a class="moz-txt-link-freetext" href="http://osgeo-org.1560.x6.nabble.com/r-mapcalc-and-us-of-max-value-tp5049643.html">http://osgeo-org.1560.x6.nabble.com/r-mapcalc-and-us-of-max-value-tp5049643.html</a>
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
GIS Consultant, Arava Development Co.
<a class="moz-txt-link-freetext" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a></pre>
</body>
</html>