0

I want to calculate the mean precipitation from a PRISM raster for a land use data layer using the Zonal statistics as table tool for ArcGIS 10.7. The land use vector layer contains over 20,000 polygon features, the majority of which are smaller than the PRISM raster cells. The PRISM Precipitation raster is 4 km (source data includes cell size = 0.04167 sq decimal degree units). enter image description here Both raster and vector layers are in the same coordinate system. What I input to the Zonal statistics as table tool:

Input feature zone data: Land use layer

Zone field: ObjectID

Input value raster: PRISM raster

Statistics Type: Mean

Raster Analysis > Cell size: Maximum of Inputs

The result is a zonal statistics table with about 700 records instead of the 20,000 records I would expect based on the ObjectID field I set as the zone field. The tool is only calculating zonal statistics for a subset of land use features, or a single feature of many that fit inside the 4km raster cell.

My thought is that I need to define the cell size in the raster analysis setting to a smaller cell size so that every land use feature is assigned a raster cell. I am not sure how to do this correctly, so that each raster cell is assigned to all land use polygons that fall within its area. Would this be set to Minimum of inputs, or a cell size smaller than 1? Also wondering if I need to convert units, or use the snap raster setting?

2
  • Do you mind stating why you are needing to do this? It doesn't really make a whole lot of sense calculating the mean value for each zone if each zone is contained within one raster cell. Also what is the spatial extent of your polygon zones?
    – Liam G
    Commented May 29, 2020 at 22:08
  • I want the average precipitation for land use feature so I can classify them by low vs high precipitation. I selected mean statistics type because multiple raster cells appear to fall within some of the larger land use polygons. (I don't think it would make a difference for the smaller polygons since the mean would simply be calculated using the single cell). The raster grid covers the entire US but the polygon layer is a state county, so much smaller. Both are in GCS North America 1983. The spatial extent of the polygon layer is coordinates Top: 40.7; bottom: 34.8; left: -122.9; right: -118.3
    – kent
    Commented May 29, 2020 at 22:33

2 Answers 2

2

Ok so you don't need to set a raster cell size. If you set the zone to the polygon ID field you will get a table with mean climate values for each polygon (your expected 20,000) and then you can join this by the ID field back to your vector dataset.

13
  • This land use attribute table doesn't contain a polygon ID field, just the objectID records, which I thought would work as well. Do I make a polgyon ID field? I don't see how it would be different than the objectID field for this purpose if each objectID is a unique value of the feature polygons?
    – kent
    Commented May 29, 2020 at 23:45
  • What ever field is the unique identifier for each row will work.
    – Liam G
    Commented May 30, 2020 at 0:04
  • I already tried this - the objectID field is the unique identifier - as the zone field for the zonal stat tool and the result is the 700 record field, not the expected 20,000 based on the 20,000 object ID rows. I think it has more to do with the fact that the majority of polygons are smaller than the raster cells, and need to set the cell size so that the tool calculates based on the smaller cell matrix that captures the smaller polygons
    – kent
    Commented May 30, 2020 at 0:07
  • 1
    Ohh I get you now. You don't need to set the cell size, you need to resample the raster so the cell size is smaller than the polygons. OR convert the polygons that don't get picked up by the zonal stats to centroids and use the Extract by Point tool to get the value of the cell the small polygons are in.
    – Liam G
    Commented May 30, 2020 at 0:26
  • 1
    Okay thanks, the Resample tool seems like the easier option. What cell size for x, y do you recommend? Would it be some fraction of the cell size of the current raster cells (0.04167 DD)? Do I assume it is asking for cell size in the same units, decimal degrees, I think?
    – kent
    Commented May 30, 2020 at 0:50
0

The simplest way I know how to do this is to clip the raster to the extent of the landuse layer. Then I projected the clipped raster layer (as a geographic coordinate system) to a projected coordinate system appropriate to the region (in this case California Albers Teale 1983) using the Project tool.

Then used Resample tool on the projected layer by adjusting the cell size to a 10 meter dimension, using the bilinear option. This created a raster with cells small enough to provide values for every polygon in the land use layer.

I used Zonal statistics by table with objectID for the zone field and the table returned all the objectID fields ~20,000 that I could join back to the land use layer.

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.