Why your output raster is larger than your environment extent?

When using a geoprocessing tool, for example Hillshade, when you specify an extent in the environment settings, you might have noticed sometimes that your output raster is slightly larger than your specified extent. Ever wondered what is going on inside the box? Let’s find out what triggers that effect.

The Extent environment controls where the raster analysis occurs, which means that the tools that honor this environment will only process the raster cells that fall within the extent. When you specify an extent in the environment, the lower-left corner of the specified extent will automatically become the lower-left corner of the output raster, unless you have also specified a Snap Raster environment. From here, the upper-right corner of the output raster is adjusted in such a way that the specified extent falls within your output raster. Whether the upper-right corner will be adjusted or not is determined by the output cell size, and the width and the height of the output raster extent are multiples of the output cell size. The end result is that the extent of the actual output raster can be slightly larger than what you specified in the extent environment.

Adjusted output raster extent

If the lower-left corner of the extent does not match with any cell corner of the input raster, it will create a shift in the cell alignment between the input and the output raster. This difference of cell alignment will trigger a resampling of the input raster to perform analysis.  Most Spatial Analyst tools use a nearest neighbor resampling technique, except for the Surface tools, which use bilinear interpolation.

You can avoid getting this shift in cell alignment and resampling by specifying a Snap Raster to your input raster in the environment setting.  To know more about Snap Raster, read How the Snap Raster environment setting works.

This entry was posted in Analysis & Geoprocessing and tagged , . Bookmark the permalink.

Leave a Reply

2 Comments

  1. joyoung_kerrvilletx says:

    Just a warning and maybe it has changed since the last time I used the Snap Raster environment setting, but in my experience enabling Snap Raster greatly increases the processing time. We would disable it while configuring our models or geoprocessing tools and then enable it once everything was configured and tested.

    • Sarmistha Chatterjee says:

      @joyoung_kerrvilletx Enabling Snap Raster in the environment will trigger resampling of input rasters. However, it should not affect the performance as you have described above. If you are still having this problem, please share your data and workflow so that we can understand the source of it.