<div>Hello.</div>
<div>&nbsp;</div>
<div>I have proved the solution given by Marco (replace in v.rast.stats every instance of&nbsp;r.cats (there is&nbsp;only 1) with r.category). It seems to work but finally the output shows other problem:</div>
<div>&nbsp;</div>
<div>C:/GRASS/scripts/v.rast.stats: v.db.addcol: command not found</div>
<div>&nbsp;</div>
<div>I have a file named v.db.addcol in C:\GRASS\scripts and in C:\GRASS\bin (a batch file).</div>
<div>&nbsp;</div>
<div>I&#39;ve proved too the solution given by Glynn. First, I have installed the latest version of GRASS for windows (native). Then, I checked that I have the script and the batch file, as I show below:</div>
<div>&nbsp;</div>
<div>In the folder C:\GRASS\bin, the file r.cats (bat) contains the next:<br><br>@&quot;%GRASS_SH%&quot; -c &#39;&quot;%GISBASE%/scripts/r.cats&quot; %*&#39;</div>
<div>&nbsp;</div>
<div>In the folder C:\GRASS\scripts, the file r.cats contains the next:</div>
<div><font size="2">
<p>#!/bin/sh</p>
<p># MODULE: r.cats wrapper</p>
<p># AUTHOR(S): Glynn Clements</p>
<p># COPYRIGHT: (C) 2008 by the GRASS Development Team</p>
<p># This program is free software under the GNU General Public</p>
<p># License (&gt;=v2). Read the file COPYING that comes with GRASS</p>
<p># for details.</p>
<p>g.message -w &quot;This module has been replaced by r.category&quot; </p>
<p>exec r.category &quot;$@&quot;</p>
<p>&nbsp;</p>
<p>I think everything is correct, but when I execute v.rast.stats, the output says that r.cats is a command not found.</p>
<p>Could be the problem in referencing the folders where the files are?</p>
<p>Many thanks.</p>
<p>Gonzalo Moreno.</p></font></div>
<div>&nbsp;</div>
<div><span class="gmail_quote">2008/8/19, Glynn Clements &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>Marco Pasetti wrote:<br><br>&gt; &gt;I have a lot of polygons in a vector layer and a DTM (raster). I want to<br>
&gt; &gt;know the maximum, minimum and mean height (of the DTM) for each polygon.<br>&gt; &gt;I&#39;m trying to use the command &gt;v.rast.stats (update areas attributes from<br>&gt; &gt; &gt;raster). It starts working but at the end shows the next message:<br>
&gt; &gt;C:/GRASS/scripts/v.rast.stats: r.cats: command not found<br>&gt;<br>&gt; r.cats has been replaced by r.category in GRASS 6.3.0<br>&gt; it seems that v.rast.stats has not been updated accordingly to the changes<br>
&gt; in 6.3.0<br>&gt; to fix it you need to open C:/GRASS/scripts/v.rast.stats and replace every<br>&gt; instance of r.cats (I suppose only 1) with r.category<br><br>The first releases of 6.3.0 made a symlink from r.cats to r.category,<br>
but Windows doesn&#39;t have symlinks. The later releases should include a<br>script (and, on Windows, a batch file) for r.cats which simply<br>executes r.category.<br><br>If the script and/or batch file are missing, you can just create them<br>
as follows.<br><br>$GISBASE/scripts/r.cats should contain:<br><br>#!/bin/sh<br>g.message -w &quot;This module has been replaced by r.category&quot;<br>exec r.category &quot;$@&quot;<br><br>$GISBASE/bin/r.cats.bat should contain:<br>
<br>@&quot;%GRASS_SH%&quot; -c &#39;&quot;%GISBASE%/scripts/r.cats&quot; %*&#39;<br><br>[there&#39;s a lot of punctuation there, so it&#39;s probably safer to copy<br>one of the other .bat files and just change the script name.]<br>
<br>Similar scripts exist for d.paint.labels (replaced by d.labels) and<br>p.out.vrml (replaced by r.out.vrml).<br><br>--<br>Glynn Clements &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;<br>
</blockquote></div><br>