[GRASS-windows] Problem with v.rast.stats
Glynn Clements
glynn at gclements.plus.com
Tue Aug 19 07:57:32 EDT 2008
Marco Pasetti wrote:
> >I have a lot of polygons in a vector layer and a DTM (raster). I want to
> >know the maximum, minimum and mean height (of the DTM) for each polygon.
> >I'm trying to use the command >v.rast.stats (update areas attributes from
> > >raster). It starts working but at the end shows the next message:
> >C:/GRASS/scripts/v.rast.stats: r.cats: command not found
>
> r.cats has been replaced by r.category in GRASS 6.3.0
> it seems that v.rast.stats has not been updated accordingly to the changes
> in 6.3.0
> to fix it you need to open C:/GRASS/scripts/v.rast.stats and replace every
> instance of r.cats (I suppose only 1) with r.category
The first releases of 6.3.0 made a symlink from r.cats to r.category,
but Windows doesn't have symlinks. The later releases should include a
script (and, on Windows, a batch file) for r.cats which simply
executes r.category.
If the script and/or batch file are missing, you can just create them
as follows.
$GISBASE/scripts/r.cats should contain:
#!/bin/sh
g.message -w "This module has been replaced by r.category"
exec r.category "$@"
$GISBASE/bin/r.cats.bat should contain:
@"%GRASS_SH%" -c '"%GISBASE%/scripts/r.cats" %*'
[there's a lot of punctuation there, so it's probably safer to copy
one of the other .bat files and just change the script name.]
Similar scripts exist for d.paint.labels (replaced by d.labels) and
p.out.vrml (replaced by r.out.vrml).
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-windows
mailing list