Annalisa wrote:
I'm experiencing some problems with v.rast.stats
and (I suppose) v.category.I have a lines vector file and I want to obtain
some statistics on each feature.
...
I made an attempt with the NC spm dataset: I
took the elevation@PERMANENT map and the
streams@PERMANENT (vector), I copied the streams
in user1 mapset, set DEBUG at "2" and obtained:GRASS 6.5.svn (nc_spm_08):~ > v.rast.stats
vector=streams@user1 layer=1
raster=elevation@PERMANENT colprefix=stats
percentile=90 --verbose
...
ERROR: No categories found in raster map
Hi,
v.rast.stats was only designed to work on vector
areas, not lines.
NAME
v.rast.stats - Calculates univariate statistics from a
raster map based on vector polygons and uploads statistics
to new attribute columns.
...
# PURPOSE: Calculates univariate statistics from a GRASS raster map
# only for areas covered by vector objects on a per-category base
#
... and internally it runs "v.to.rast .. type=area"
you might try editing the script to change that
type=area to type=area,line. Maybe it works, or
maybe it violates some other assumption. not really
sure.
Hamish