Criteria for raster cell extraction by mask

1458
4
09-28-2011 08:22 PM
AnnaUkkola
New Contributor
Hello,

I am using Spatial Analyst -> Extraction -> Extract by mask  to extract cells from a raster grid using a polygon shapefile as  the mask. I was hoping to find out what condition ArcMap uses to perform the extraction and how it selects which cells to extract when they lie on the shapefile boundary (i.e. when part of the cell is within the polygon and part of it outside it). Does ArcMap extract the cells if a certain percentage of the boundary cell is located inside the shapefile polygon or what criteria does it use exactly? I need this information for academic research purposes. I am using default environment settings.

thank you in advance!
0 Kudos
4 Replies
MarkEnglish
New Contributor II
Once the process is complete, review the masked polygon to the resulting raster.  If percentages become suspicious, convert the rasters to polygons and perform a percentage calculation.  I believe it simple utilizes the intersect process.  Correct me if I'm wrong.
0 Kudos
EricRice
Esri Regular Contributor
Anna,

The determining factor is whether or not the cell center falls within the polygon (mask).  It has nothing to do with percentages.  You can verify this by converting your resulting raster to points.  You won't see any points outside the polygon.

When you perform the extraction I would encourage you to set the Snap Raster in the Environment Settings back to the original raster you were clipping.  If not, your output will be shifted from the original pixels.

Internally, we convert the polygon mask to a raster then use that raster to do the extraction.  If you are truly concerned about the area (percentage of area), you can convert your polygon to a raster in advance of the extraction.  When you do this, make sure you run the Polygon to Raster tool with the Cell Assignment Type parameter set to Maximum Area.  Then use the resulting raster as the mask.  When we convert your polygon input to raster behind the scenes we are using Polygon to Raster - expect we use the defaults which is Cell Center.

Hope that helps explain how it works.

Regards,
Eric
0 Kudos
AnnaUkkola
New Contributor
Thanks so much for your replies, this definitely helps me a lot!
0 Kudos
ThomasLaxson
New Contributor III

Internally, we convert the polygon mask to a raster then use that raster to do the extraction.


Is this type of behind-the-scenes processing documented somewhere? Being aware of such extraneous steps could really help to reduce processing time. For example, I'm masking 500 rasters to one polygon layer. According to this, it would save me a ton of processing time to convert the polygon layer to a raster just once and then use that raster as my mask layer. The help page for the Extract by Mask tool does not mention this crucial piece of information; is there some other resource where such details are noted for all tools?
0 Kudos