[GRASSLIST:2500] statistics about areas.

Hi all.
I can't focus a problem in a right way. Perhaps someone could give me some
hints.

I've got three maps:
* vector map of areas representing subwatersheds
* raster map of soil types
* raster map of land uses
(well, I could transform the vector files into raster if it is needed)

In order to run an hydrologic model I need to know for every subwatershed,
the area of every different combination of soil-landuse.

I've also got Postgres tables that says what kind (label) of land use
corresponds to each code, and the same for the different soil types.

So I would like to create some kind of report that could find all
combinations for every subwatershed and say something like:

COMBINATION SUBWATERSHED AREA(ha)
soil1-landuse1 1 45
soil1-landuse2 1 185
soil2-landuse1 1 54
soil1-landuse5 2 32
...
for all watersheds

I've thought that perhaps with the help of R (or R-Postgres in someway) this
could be possible but I can't find my way.

Thanks a lot for your ideas,

Best wishes,

Javier

[Friday 06 February 2004 15:18] From javier garcia - CEBAS

In order to run an hydrologic model I need to know for every subwatershed,
the area of every different combination of soil-landuse.

First shot:
v.to.rast i=subwatersheds o=rasterofsubwatersheds

r.volume d=rastersoil c=rasterofsubwatersheds

or

r.stats rastersubwatersheds,rastersoil,rasterLU