I have some large NDVI and DEM images of Kerala, India. I also have a shapefile of the subdistricts in Kerala. I need to clip both the NDVI and the DEM so that there is an individual raster of NDVI and DEM for each of 14 subdistricts.

I used the clip function of the image analysis window to do this quickly, but the NDVI and DEM for each subdistrict don't have exactly the same numbers of rows and columns, which is a requirement for my application ( they will be converted to ASCII ). They are usually off by one column or one row.

I don't understand how this can happen because I am using the exact same shapefile to clip both rasters. This is in ArcMap. Sorry if this isn't enough info or a newbie question, I'm still learning.

The cell size of the two rasters must also be the same, so I can't just export the rasters and force a different number of columns because that would change the cell size.


2 Answers 2


The answer is detailed quite accuratly in the online help from ESRI, i just did a little formatting so it's clean here. You will have as a requirement to choose the first raster clipped with your shapefile to use as an alignment raster to line up the others :

How To: Align the cells of the output raster with the cells of another raster using the Clip tool

To align cells of the output raster from the Clip tool with another raster, set this other raster as the snap raster in Environment settings. Additionally, set the projection and the cell size of the output raster the same as the snap raster.


  • Set the snap raster, the output coordinate system, and the cell size in the Clip tool's Environment Settings.

  • Open the Clip tool. On the Geoprocessing menu, click Clip. In the Clip tool dialog box, click the Environments button.

  • In the Environments Settings dialog box

    • under Processing Extent, set the alignment raster as the Snap Raster.

    • under Output Coordinates, set the Output Coordinate System to the snap raster.

    • under Raster Analysis, set the Cell Size to be the same as the snap raster.

  • Click OK, and OK again to close the dialogs and save the settings.


You need to ensure that both rasters have the same origin point and cell size. They probably did not actually match up before the clip.

The best way to do this is to use the Resample Tool under Data Management>Raster>Raster Processing. Take one layer and run resample on it. Set the cell size to exactly that used in the other layer by navigating to that layer in the pull-down box. Before you execute the tool, click the Environment button at the bottom and make its Processing Extent also match that of the other layer. You should get a new version of the original layer that exactly matches the placement and cell size of the other.

Afterthought: another possibility is that you made different choices in checking "Maintain Clipping Extent" on the two executions of Raster Clip. Don't maintain the extent if you want it to match the original exactly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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