[GRASS-user] Help - Tabulate Areas (ESRI function) for GRASS
Micha Silver
micha at arava.co.il
Wed May 30 13:56:28 PDT 2012
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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
> This mail was received via Mail-SeCure System.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20120530/9037d771/attachment.html>
More information about the grass-user
mailing list