I have a very large raster file of land use types for a landscape. I am trying to run an occupancy model of large carnivores and need to test the weight as a covariate, of human settlements. Human settlements are marked red in the raster file band palette and the label reads 'human settlements'.

I've created a shapefile of a polygon grid of 6x6km cells. I need to know the % of each cell covered by human settlements.

I've ran Zonal Stats with the said polygon grid shp file (as 'vector layer containing zones') and the raster file but my resulting attribute table for the polygon shp file gives me no indication of %s (or any stats) of specific land types, just overall stats for the raster layer it seems.

How can I get data from my cells for specific land use types?

  • I've been following instructions here: gis.stackexchange.com/questions/242020/…. However I'm struggling to rasterize the polygon grid i'm using, and before I continue down that route would like to know if Zonal Stats can provide me the data I need
    – rae
    Commented Jan 24, 2019 at 22:59
  • Without knowing the raster structure this is difficult to answer. Can you isolate just the required raster cells into a binary raster file to begin with?
    – ndawson
    Commented Jan 24, 2019 at 23:16
  • I'm not sure what a binary raster file is. By isolating do you mean clipping? This is all new to me so apologies for more questions. I've managed to now rasterize the concerned polygon, but after running zonal grid I still do not have a clear breakdown of stats relevant to each value of the raster band within each cell of my grid.
    – rae
    Commented Jan 24, 2019 at 23:22
  • What kind of raster is it? Is it a continuous or discrete raster (float or integer data)? Does it have multiple bands, or a single band? Unfortunately saying "Human settlements are marked red in the raster file band palette" does not let us know enough to understand your data. Maybe Google a bit what discrete or continuous rasters are, and check if your is one or the other?
    – jberrio
    Commented Jan 25, 2019 at 0:15
  • Incase more clarity is needed - I have a continuous raster with a single colourramp band. I also have an overlaid polygon grid, each cell labelled with an ID number. I need to obtain for each cell of the grid a sum of each land cover type, or band label type, of the raster layer. i.e. for Cell 1 I need to know the sum of or relative % of land covered in that particular cell by human settlement, closed woodland and bare land land types
    – rae
    Commented Jan 26, 2019 at 2:56


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.