6

I just needed to confirm something that I think I already know the answer to because help pages are always unclear.

I am running ArcGIS 10.2.2 and often use the Zonal Statistics and Tabulate Area Tools. I wanted to confirm that the area of a pixel will only be included in the tabulated area if the pixel centroid is in the zone and that the whole pixel area will be included, even if part of the pixel is outside of the zone. Vice versa, if the pixel centroid is outside of the zone, the area will not be included even if part of the pixel is inside the zone.

Furthermore, I just installed Geospatial Modeling Environment (GME) for ArcGIS 10.2 and am wondering if the zonal statistic tools in this program, such as Intersect Polygon Raster (IsectPolyRst) works in the same manner.

Thanks

  • 5
    I don't know the answer for sure, but I do know that both the Zonal Statistics and Tabulate Area tools work with rasters only. If your Zone layer is a vector layer, the tool will convert it to a temporary raster before doing the analysis. So the exact boundaries of your vector layer are not actually being used. The Help advises converting your Zones to raster beforehand, so you have total control over the Zone raster, and so you can see it before the analysis runs, rather than having Arc do it behind the scenes. – Dan C Oct 3 '14 at 16:01
  • Good advice. I guess calculating area in a raster will always be an estimate anyway, unless the raster resolution is super fine. – Calavin Oct 3 '14 at 16:21
  • @WhiteboxDev because I don't know if it's right. Seems like someone would have to take a look at the temporary raster that ArcGIS generates when given a vector Zone layer to know for sure. I'd imagine that it would generate a Zone raster with the same extent and cell size as the raster you're generating statistics for, but I don't know. – Dan C Oct 3 '14 at 16:36
  • 2
    I like the advice from @DanC in his first comment. If you convert your zone layer to raster (using Polygon To Raster), you have options for CELL_CENTER, MAXIMUM_AREA, or MAXIMUM_COMBINED_AREA (the latter is potentially useful if you have overlapping polygons) so you would get added control. And of course you can choose your own Snap raster etc. – jbchurchill Oct 3 '14 at 17:10
  • Okay, how's this as an answer then? Seeing as how we cannot know how ESRI performs the internal rasterization when you provide a vector Zone layer, the best approach would be to rasterize it yourself first. In that way you can control (and be certain of) the method (Cell_Centre, Max_area, Max_Combined_Area) that is used to define the boundaries between zones. The answer combines parts of DanC, mine and jbchurchill's replies. Why don't you take it @DanC? You were the first to the scene. – WhiteboxDev Oct 3 '14 at 17:38
4

Unfortunately, because ArcGIS's source code is not publicaly available, we cannot know for certain how ESRI treats boundary locations when you provide a vector zone layer input. However, as DanC points out above, it is very likely that there is some kind of internal vector-to-raster conversion that is taking place such that the vector zone layer is mapped onto the same raster structure as the data layer. I've had some experience with programming a similar tool (see here) and this is the only logical way to handle this particular problem.

As jbchurchill points out in the comments section, there are actually multiple criteria that grid cells can be classified using when performing vector-to-raster conversion in ArcGIS, including CELL_CENTER, MAXIMUM_AREA, and MAXIMUM_COMBINED_AREA. It is very likely that the CELL_CENTER approach is being used internally because it is the most efficient method, and if this is the case, the answer to your question would be yes, the cell centre must be within the zone to be counted.

The best approach to handling this issue would be to perform the vector-to-raster conversion yourself prior to running the Zonal Stats operation, such that you have more control over how boundary cells are handled. (Note: I've deleted my comments above to remove some of the discussion element of how this answer was derived and I also would like to fully credit DanC and jbchurchill for their contributions. DanC, I still say, if you're willing to post something...I'll delete my answer so you can get the credit!)

  • 1
    Both the Zonal Statistics tool and Tabulate Area tool definitely convert vectors to rasters internally before running the analysis, it says so in the ESRI help for both tools. I wonder if it's possible to grab that temporary raster from a TEMP folder while it's running. – Dan C Oct 3 '14 at 17:57
  • @DanC If I had to guess, I'd say that the temporary raster only exists in memory since performance is clearly an issue when you write a tool that has the automagical means of allowing users to input vectors where rasters should be. Of course, I could be wrong and I don't have Arc on my computer to confirm. If you do confirm, why don't you write an answer for it to compile everything we've figured out? – WhiteboxDev Oct 3 '14 at 18:06
  • This answer is very useful to understand how the Zonal Statistics behaves in ArcGIS. gis.stackexchange.com/questions/30386/… – umbe1987 Feb 1 '16 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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