2

I have a vector that defines the grid cells (black lines in attached image) and a raster dataset that contains landscape metrics for over 50,000 patches (in different columns in the attribute table). One of the landscape metrics is patch area. I want to calculate summary statistics (e.g. mean, majority/mode, median) for that specific landscape metric within each grid cell.

I've tried using zonal statistics but it doesn't seem to work, as there is no where I can select the 'Area' column for which the stats will be calculated.

Dataset. The colors represent patch area (green = small area, red = large area)

2
  • 1
    If your black lines represent POLYGONS and not LINES then the zonal stats tool is the tool to be using, the zone field would be a unique ID for each polygon.
    – Hornbydd
    Commented Mar 23, 2017 at 15:50
  • @Hornbydd Thanks for your suggestion. I just checked - they are indeed polygons. What I'm confused about is how does the zonal stats tool know which field/column in the 'input value raster' it will calculate the stats on? Is there any way of specifying this?
    – Leona R.
    Commented Mar 24, 2017 at 7:29

1 Answer 1

1

Zonal Statistics is the typical tool for your question. Since you have a polygon layer that defines the grid cells (Zones) and a raster layer of landscape, you can use Zonal Statistics to produce a new raster with the statistical info you want (Mean, Majority, Maximum, Median, Minimum, Minority, Range, Std, Sum, Variety).

Based on the above help Input value raster is

Raster that contains the values on which to calculate a statistic

For example if you choose the Mean statistic type, the output zonal raster will calculate the mean of the pixel values of the input raster data within that zone.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.