Thank you all. I thing I have managed to do this using r.statistics firstly converting county polygons to Raster.<div>THank you guys</div><div><br></div><div>By the way, is there any special requirement, besides being a CELL, for base data?</div>
<div><br></div><div>Thanks<br><br><div class="gmail_quote">On Mon, Jan 18, 2010 at 12:52 PM, Markus Metz <span dir="ltr"><<a href="mailto:markus.metz.giswork@googlemail.com">markus.metz.giswork@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
Pedro Roma wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings all<div class="im"><br>
As far as I can see, r.statistics (<a href="http://grass.itc.it/grass64/manuals/html64_user/r.statistics.html" target="_blank">http://grass.itc.it/grass64/manuals/html64_user/r.statistics.html</a>) uses as cover and as basis a RASTER map. But, "All cells in the base layer are considered one object for the analysis". This is not what I want because I want base layer to be a polygon not a cell. Or Am I reading this wrong?<br>
</div></blockquote>
You're right, but you can easily convert vector to raster. In this case, first set the region to match your cover map, then something like<br>
v.to.rast type=area<br>
then r.statistics<br>
<br>
v.what.rast also converts the vector to a raster first, then runs statistics. v.what.rast would be the best solution unless you want the most frequent category.<br>
<br>
Markus M<div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Sat, Jan 16, 2010 at 9:59 AM, Markus Metz <<a href="mailto:markus.metz.giswork@googlemail.com" target="_blank">markus.metz.giswork@googlemail.com</a> <mailto:<a href="mailto:markus.metz.giswork@googlemail.com" target="_blank">markus.metz.giswork@googlemail.com</a>>> wrote:<br>
<br>
<br>
Markus Neteler wrote:<br>
<br>
Pedro Roma wrote:<br>
<br>
Greetings all<br>
A few emails that people sent, regarding classigication<br>
operations GRASS<br>
were extremely helpful :)<br>
But now, I have one question:<br>
I need to do some aggregation of the classification map<br>
according to regions<br>
specified in a vector file. What I mean is, for each<br>
county I need to have<br>
an aggregation of all classified pixels in order to have<br>
only one value that<br>
represents that county.<br>
E.g. I have a land cover classification for my region and<br>
now I need to<br>
aggregate the classified map according to my counties in<br>
order to have a<br>
vector map in which each county is represented by its more<br>
frequent<br>
classification.<br>
Is this possible in GRASS? Was I clear :D ?<br>
<br>
<br>
Could this be of interest?<br>
Addons: r.univar.zonal<br>
<a href="http://svn.osgeo.org/grass/grass-addons/raster/r.univar2.zonal/r.univar.zonal.html" target="_blank">http://svn.osgeo.org/grass/grass-addons/raster/r.univar2.zonal/r.univar.zonal.html</a><br>
<br>
Or r.statistics with method=mode, gives you the most frequent<br>
value in cover map for each value in base map. AFAIK,<br>
r.univar[.zonal] doesn't have modal as output.<br>
<br>
Markus M<br>
<br>
<br>
</blockquote>
</div></div></blockquote></div><br></div>