[GRASS-user] r.buffer
Giovanni Pasini
jynxtor at gmail.com
Thu Oct 29 04:48:59 EDT 2009
Alessandro Bertan ha scritto:
> Hi!
>
> Thank you for your useful indications! It seems that the addon
> v.what.rast.buffer is capable of doing what I want. I am trying to
> modify it by substituting r.univar -g with r.stats -anl but I get the
> following error message:
>
> Calculating stats for cat ...
> Sorry, <map> is not a valid parameter
>
> ERROR: Required parameter <input> not set:
> (Name of input raster map(s)).
>
> I would greatly appreciate if you give me some suggestions on how me
> to solve this problem!
>
> thanks again!
>
> Alessandro
Alessandro,
Some mounth ago I have modified the script to have a report for each
point into a text file. Here the code:
#%option
#% key: prefix_stats
#% type: string
#% gisprompt: new_file,file,output
#% key_desc: name
#% description: Name for output prefix stats data (if omitted or "-"
output to stdout)
#% required: no
#%end
[...]
PREFIX_STATS="$GIS_OPT_PREFIX_STATS"
[...]
if [ -e "$PREFIX_STATS" ] ; then
g.message -e "Output File [$PREFIX_STATS] already exists"
exit 1
fi
[...]
g.message " Calculating stats for cat $ID ..."
echo $ID >> ${PREFIX_STATS}.txt
r.stats -clN in="$MAP" fs="|" >> ${PREFIX_STATS}.txt
eval `r.univar -g map="$MAP"`
Hope can help!
Giovanni
> _______________________________________________
> grass-user mailing list
> grass-user a lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
More information about the grass-user
mailing list