[Qgis-user] Zonal Statistics multiple classe

Kirk Schmidt kirk at nortekresources.com
Tue Feb 13 06:14:02 PST 2018


Hi Nicolas:

I would use the SAGA Raster Statistics for polygons tool which which you 
can access through the processing toolbox.



On 2/12/2018 5:38 AM, Nikos Alexandris wrote:
> * Nicolas Cadieux <nicolas.cadieux at archeotec.ca> [2018-02-11 23:37:13 
> -0500]:
>
>> Hi,
>> I have a raster (int16) with multiple class (ex 1 = grass, 2 = 
>> trees...) and a vector polygon file.  I want to have the zonal 
>> statistic (cum, min, max, sum...) for every class.  What is the best 
>> way to get this done in QGis 2.18.16 on Windows 10?
>>
>> Thanks,
>> Nicolas
>
> Nicolas,
>
> not a direct answer, yet if you have access to GRASS' tools, then you 
> could look
> into v.rast.stats.html [0] (or even r.stats.zonal [1] if you have a
> raster version of your "polygons").
>
> If I understand correctly, you want to get statistics per polygon, not
> per class. I.e., min, max, sum and the rest, for each class inside
> each vector polygon.
>
> v.rast.stats will derive the statistics in question from a raster map
> for the parts covered by the vector map. Note, internally, the vector 
> map is
> converted to a raster.
>
> If you have two rasters, then your base map is the "multiple classes 
> map".
> Your cover map will be the "rasterised vector polygons", which you 
> consider as
> the zones to compute the statistics in question within. Very useful,
> here, is the `-r` flag: "Create reclass map with statistics as category
> labels".
>
> Nikos
>
> [0] https://grass.osgeo.org/grass74/manuals/v.rast.stats.html
> [1] https://grass.osgeo.org/grass74/manuals/r.stats.zonal.html
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

-- 
Kirk Schmidt, MScF, BScF, RPF
General Manager
Nortek Resource Solutions Inc.
RR # 1
Thorburn, NS
B0K 1W0
Tel (902) 922.3607
Email: kirk at nortekresources.com
Web: www.nortekreources.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180213/a166a446/attachment.html>


More information about the Qgis-user mailing list