[GRASS-user] v.rast.stats (r.category) fail?
Hamish
hamish_b at yahoo.com
Sat Dec 10 17:19:13 EST 2011
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 at PERMANENT map and the
> streams at 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 at user1 layer=1
> raster=elevation at 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
More information about the grass-user
mailing list