Zonal Statistics as table creates output but some are Null

I have temperature as a raster file and different ecoregions of a province as polygons. What I want to do is calculate the mean temperature per ecoregion.

I succeeded in doing this by Zonal Statistics which creates an output raster, but what I actually want, as I realized later, is I the temperature value per ecoregion. So how do I assign that value to the ecoregion?

I thought I can do zonal statistics as table and then join this table to the ecoregion. It does work but for some reason it does not calculate values for some of the ecoregions (1400 ouf of 7400 get null values). I tried to find a pattern in the ecoregions that didn't get assigned a value, so e.g if they were too small or have a too complicated shape or if they are at the edge of the province...but no..they are just randomly distributed.

Any ideas or something that I am missing?

• Thank you Aaron and Egdetti for your time. (sorry Whuber for my mistake) Aaron you explained the process really nice, thank you a lot. Egdetti, you pointed me to the right direction, the different projections of the two datasets mess the zonal statistics table up. I wasn't aware that this is an issue :-( My raster layer is a floating point raster with the spatial reference of NAD_1983_BC_Environment_Albers, Datum:D_North_America_1983 my zone layer (polygons) was in GCS_North_American_1983 but with the same Datum. (This made me realize that I don't really understand what the datum is?) However, – Sandra Nov 7 '12 at 1:41
• I recommend that you use the information that you provided as an answer converted to a comment to revise your question using the edit button beneath it. This answer from a Meta Q&A may help explain the philosophy behind our Q&As. – PolyGeo Apr 16 '15 at 0:43
• Hi, I have the same problem, only instead of null values some zones are not there at all in the zonal statistics table. Only 1611 out of 1739 get the mean value. Other have dissapeared from the table. Ive also tried reprojecting the raster into the same projection as zone feature class. – Salman Jul 4 '15 at 16:39

I took a look at the data you provided. Initially, I had issues getting ArcMap to recognize the ASCII raster format. I had to open the ascii file in Notepad++ and rename it as a .asc file instead of .ascii. Once I got it into ArcMap, I had projection issues. I was able to get everything working properly by reprojecting the .asc raster to another projection (it shouldn't matter which projection you use, I used CA Teale Alber's just because that's what I use for work, but you should use one that makes sense for the area). In the process of reprojecting the data, it converted the raster from ascii to a .img. Using the newly reprojected .img raster as an input, I had no issues with NoData appearing in my zonal statistics raster or table (I ran both tools).

I suspect that this is a format issue that may relate to the projection file included with the .ascii raster. Try reprojecting the ascii file (and in the process converting it to a .img) and using that as an input and see if that works for you.

• Hi, thanks for your time. Good point, but no I left it checked. – Sandra Nov 6 '12 at 19:37
• Can you provide a sample of your temperature raster so I can run some tests? – bluefoot Nov 6 '12 at 19:41
• Sure, how can I send it to you? – Sandra Nov 6 '12 at 19:42
• I've updated my answer to reflect what I found working with your data. – bluefoot Nov 6 '12 at 20:44
• It is inappropriate on this site to use the Q&A space to carry out a private conversation in which others cannot participate! Sandra, please provide a public location for those data so others can view them, or we will need to close this thread. – whuber Nov 6 '12 at 21:39

The attached sample data shows two layers: a raster and polygon feature class. The raster shows monthly max temperature across the USA. Consider the three polygons ecoregions 1, 2 and 3. The goal here is to do the following:

1. Run zonal statistics to calculate the average max temp within each ecoregion.
2. Join the output table to the ecoregion layer.
3. Export the joined layer to a featureclass in order to make the joins permanent.

Run Zonal Statistics as Table

Join the new zonal table to the ecoregion layer. Make sure the feature class/shapefile and zonal table are both either inside or outside of a geodatabase so that the OID or FID will be easier to sync.

Finally export the ecoregion layer to a shapefile or featureclass in order to make the join permanent.