How to calculate the area of several classes of a raster in a polygon of a vector file with qgis?

by laulau   Last Updated December 06, 2018 15:22 PM

I have some trouble with Qgis

I have two layers of information: - the first one a vector that contains 500 objects, with attributes such as number of population,... - and a raster that has three classes: degrade (-1), stable (0) and improvement (1), plus -9999 which corresponds to non-values

What I would like to obtain, is in the attribute table of my vector layer, the percentage (area) of the three classes of my raster

something like this, in the row one : - the id, the population, the area of class 1, the area of class 2, the area of class 3. and so on for my other 500 lines.

I tried thing with Zonal statistics but I couldn't obtain what I wish

thank you so much

Tags : raster vector area

Related Questions

Updated June 26, 2018 16:22 PM

Updated February 21, 2018 10:22 AM

Updated July 20, 2015 18:09 PM

Updated April 25, 2018 19:22 PM

Updated March 31, 2016 08:09 AM