[GRASS-windows] Problem with v.rast.stats

Gonzalo Moreno gmorenovergara at gmail.com
Wed Aug 20 06:16:14 EDT 2008


Hello.

I have proved the solution given by Marco (replace in v.rast.stats every
instance of r.cats (there is only 1) with r.category). It seems to work but
finally the output shows other problem:

C:/GRASS/scripts/v.rast.stats: v.db.addcol: command not found

I have a file named v.db.addcol in C:\GRASS\scripts and in C:\GRASS\bin (a
batch file).

I'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:

In the folder C:\GRASS\bin, the file r.cats (bat) contains the next:

@"%GRASS_SH%" -c '"%GISBASE%/scripts/r.cats" %*'

In the folder C:\GRASS\scripts, the file r.cats contains the next:

#!/bin/sh

# MODULE: r.cats wrapper

# AUTHOR(S): Glynn Clements

# COPYRIGHT: (C) 2008 by the GRASS Development Team

# This program is free software under the GNU General Public

# License (>=v2). Read the file COPYING that comes with GRASS

# for details.

g.message -w "This module has been replaced by r.category"

exec r.category "$@"



I think everything is correct, but when I execute v.rast.stats, the output
says that r.cats is a command not found.

Could be the problem in referencing the folders where the files are?

Many thanks.

Gonzalo Moreno.

2008/8/19, Glynn Clements <glynn en gclements.plus.com>:
>
>
> 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 en gclements.plus.com>
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://lists.osgeo.org/pipermail/grass-windows/attachments/20080820/d85589a6/attachment.html


More information about the grass-windows mailing list