Hi Rasmus,<br><br><div class="gmail_quote">On Fri, Mar 18, 2011 at 9:15 AM, Rasmus Borgstrøm <span dir="ltr"><<a href="mailto:Rb@gras.ku.dk">Rb@gras.ku.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="margin: 4px 4px 1px; font: 10pt Segoe UI;">
<div>Hi Markus</div>
<div> </div>
<div>Yes you're right. Solved the output issue. Thanks! </div></div></blockquote><div><br>excellent. <br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="margin: 4px 4px 1px; font: 10pt Segoe UI;">
<div> Next problem is then how to access the minimum value in the stats.txt file. Can you guide me in a direction or to script examples (unfortunately I didn't find any in your book)?</div></div></blockquote><div><br>
In general, see page 49 for the usage of the eval function (I am not quite sure that this works on<br>Windows, though). Shell script style (no -t):<br><br>eval `r.univar -g -e map=MOD02QKM output=-`<br><br>BUT: since you want zonal statistics eval will fail since the same variable names are<br>
printed for each zone.<br><br>I am afraid that you have to continue with -t (table style) and perhaps consider the (file) output<br>as CSV table. Then access by row/column to feed the subsequent script.<br><br>Maybe other list member have an idea how to do that in Windows (I would use cut/grep/etc).<br>
<br>Markus<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="margin: 4px 4px 1px; font: 10pt Segoe UI;">
<div>I would like have the minimum value used in a r.mapcalc DOS_MODIS = MODISIMAGE - STATS.TXT(%MIN%)</div>
<div> </div>
<div>Basically what I am trying to is a Dark Objection Subtraction of a MODIS timeserie, so if you have ideas for other approaches for this please let me know. </div>
<div> </div>
<div>Best regards, </div>
<div>Rasmus<br><br>>>> </div>
<table style="margin: 0px 0px 0px 15px; font-size: 1em;" bgcolor="#f3f3f3" border="0">
<tbody>
<tr>
<td>
<div style="border-left: 1px solid rgb(5, 5, 5); padding-left: 7px;">
<table style="font: 9pt Segoe UI;" bgcolor="#f3f3f3">
<tbody>
<tr valign="top">
<td><b>From: </b></td>
<td>Markus Neteler <<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></td></tr>
<tr valign="top">
<td><b>To:</b></td>
<td>rasmus borgstrøm<<a href="mailto:rb@gras.ku.dk" target="_blank">rb@gras.ku.dk</a>></td></tr>
<tr valign="top">
<td><b>CC:</b></td>
<td><<a href="mailto:grass-windows@lists.osgeo.org" target="_blank">grass-windows@lists.osgeo.org</a>></td></tr>
<tr valign="top">
<td><b>Date: </b></td>
<td>18-03-2011 02:01</td></tr>
<tr valign="top">
<td><b>Subject: </b></td>
<td>Re: [GRASS-windows] Re: Zonal Statistics - min</td></tr></tbody></table><div><div></div><div class="h5">On Thu, Mar 17, 2011 at 10:41 PM, rasmus borgstrøm <<a href="mailto:rb@gras.ku.dk" target="_blank">rb@gras.ku.dk</a>> wrote:<br>
> Hi<br>><br>> I have installed winGRASS 7 and tried to calculate the zonal statistics, but<br>> I cannot seem to get the results.<br>> I tried this:<br>> r.univar -g -e -t map=MOD02QKM zones=fields.10m output=out2>fields_stats.txt<br>
><br>> I assume this will write the zonal stat to the .txt file, but I cannot seem<br>> to access/find the txt file. ?!<br><br>You are writing the output to out2 (maybe better call it out2.txt or<br>even better stats.txt).<br>
It should be in the current directory. The >fields_stats.txt will not gain<br>anything since output= is used and not set to output=- (stdout).<br><br>I guess you are already there.<br><br>Markus<br></div></div></div></td>
</tr></tbody></table></div>
</blockquote></div><br>