[GRASS-user] v.rast.stats

Hi,

After running v.rast.stats vect=catchments rast=rainfall colprefix=precip, I ran v.info -c catchments and I got 9 new columns:
precip_min, precip_max, precip_ran, precip_mean, precip_std, precip_var, precip_cf_, precip_sum,…,precip_per.

How do I then be able to see how much rain has fallen in each catchment(polygon), and which direction is the water flowing?


Kind Regards
TS Gumede
CSIR, Meraka Institute
072 258 1650

Hi,

After running v.rast.stats vect=catchments rast=rainfall colprefix=precip, I ran v.info -c catchments and I got 9 new columns:
precip_min, precip_max, precip_ran, precip_mean, precip_std, precip_var, precip_cf_, precip_sum,…,precip_per.

How do I then be able to see how much rain has fallen in each catchment(polygon), and which direction is the water flowing?

v.db.select catchments column=precip_sum

If you display the stream network over the catchments, and use the “display=shape,dir” option to d.vect then you’ll see small arrows along the streams indicating direction of flow.

···
-- 
Micha Silver
Arava Development Co. +972-52-3665918
[http://surfaces.co.il](http://surfaces.co.il)

(back on the ML)

Hi Sandile:
The error is popping up, apparently, because of the strange “-NULL” value. What is -NULL??
Can you display the rainfall raster? Does it look OK (some value everywhere?)

Perhaps run a check on the original rainfall.tif with gdalinfo to see what range of values it is showing? Then do r.info rainfall to show what range the GRASS raster has.

···
-- 
Micha Silver
[http://www.surfaces.co.il/](http://www.surfaces.co.il/)
Arava Development Co.  +972-52-3665918

if I run r.info -g rainfall, I get:

north=-33.679583
south=-34.34875
east=19.17125
west=18.29875

and if I run v.info -g catchments, I get:

north=-33.6795831
south=-34.3487498
east=19.1712501
west=18.2987501
top=0.000000
bottom=0.000000

OK, now we see that the regions are identical.
I’d like to see also the full output of
r.info rainfall
(it will give the max-min values of the raster) and also the output of
gdalinfo rainfall.tif (the original tiff file)
Perhaps then we can understand where the -NULL values are from?

···
-- 
Micha Silver
[http://www.surfaces.co.il/](http://www.surfaces.co.il/)
Arava Development Co.  +972-52-3665918

Hello Sandile
(Please keep messages on the list- maybe others can help…)

Hi

Below is the output of r.info rainfall

Type of Map: raster Number of Categories: 1020
Data Type: CELL
Rows: 480
Columns: 1440
Total Cells: 691200
Projection: Latitude-Longitude
N: 33:40:46.49916S S: 34:20:55.49928S Res: 0:00:05.01875
E: 19:10:16.50036E W: 18:17:55.50036E Res: 0:00:02.18125
Range of data: min = 0 max = 1020

The only unusual thing I notice above is that the resolution settings for the raster are different N-S and E-W. This came from the original tiff (see below) which also has rectangular pixels, and your use of the “-o” option when importing.
I wonder if that’s what is causing your problems with v.rast.stats?? (the v.rast.stats module creates a temp raster at the current region’s resolution settings, which might be different from this rainfall raster’s rectangular resolution…)

Please give us the output of g.region -p.

Perhaps someone with more experience can answer: If v.rast.stats runs using a raster with resolution different from the current region settings what will happen?

Regards,
Micha

···
-- 
Micha Silver
[http://www.surfaces.co.il/](http://www.surfaces.co.il/)
Arava Development Co.  +972-52-3665918