[GRASS-user] Help - Tabulate Areas (ESRI function) for GRASS

2012-05-30 Thread Alejandro Coca Castro
Hi, i have a raster file about land usage  (crops / urban areas ecc..)

I have defined some zones around some given points of a vector layer and
I'd like to calculate the % of those areas occupied by each value of the
raster file in order to make an estimate on the average usages of the
selected areas.

I know that in arcgis there is a function to do so called Tabulate Areas,
but I can't find such feature in GRASS.

If anyone can help me I'd be so grateful.

Regards,



-- 
*Alejandro Coca Castro* 
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Help - Tabulate Areas (ESRI function) for GRASS

2012-05-30 Thread Micha Silver

On 05/30/2012 11:07 PM, Alejandro Coca Castro wrote:


Hi, i have a raster file about land usage  (crops / urban areas ecc..)

I have defined some zones around some given points of a vector layer 
and I'd like to calculate the % of those areas occupied by each value 
of the raster file in order to make an estimate on the average usages 
of the selected areas.


I know that in arcgis there is a function to do so called Tabulate 
Areas, but I can't find such feature in GRASS.




I think you can use r.stats for this. First rasterize your (vector) 
areas with v.to.rast. Use a numeric column for the use=attr option. 
Then use r.stats with both the landuse raster and the zones raster as input.
So if you have a landuse raster, and a zones vector with i.e. a 
zone_id column, then:


v.to.rast in=zones out=zones use=attr colu=zone_id
r.stats -p in=zones,landuse fs=, out=landuse_zones_percent.csv


If anyone can help me I'd be so grateful.

Regards,



--
*/Alejandro Coca Castro/**//**//**//*//

This mail was received via Mail-SeCure System.


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

This mail was received via Mail-SeCure System.




___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user