Thursday 27 September 2018

arcgis desktop - Determining whether raster pixels in or out of zone


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.



Answer



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!)


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...