I have two rasters: a digital elevation model (DEM) and a Landsat band. The grid resolution of both is 30 m, but the grids are not coincident (see image: the dark raster on top is the DEM; the light raster underneath is the Landsat band).

I want to perform some transformation of the Landsat band so that its grid aligns perfectly with the DEM grid. I've tried resampling the Landsat band to 30 m in ArcGIS using the DEM as a Snap Raster in the Environment settings, but this does not have any effect. I've also tried clipping the Landsat band to the extent of a vector polygon (that the DEM is also clipped to), while setting the DEM as the Snap Raster, but to no avail.

I suspect this is happening because both rasters are already at the same resolution (just on different grids), but I really need their grids to be aligned to be able to do any further analysis.

Can I do this in ArcGIS Desktop?

enter image description here

  • 2
    Not all tools honour the Snap Raster environment setting (though Resample says it does, so I'm not sure why it doesn't work - maybe because the tile size didn't change (?)). Have you tried Copy Raster with the Snap Raster setting enabled? Supposedly it does honour the setting. BTW, which version of ArcGIS are you using, and which version of GDAL?
    – om_henners
    Commented Sep 24, 2012 at 6:05
  • 1
    @om_henners: apparently the issue is a bug in ArcGIS 10. See my answer below.
    – hendra
    Commented Sep 25, 2012 at 2:59

9 Answers 9


After further research, I discovered that the malfunctioning Snap Raster setting was actually caused by a bug in ArcGIS 10. The solution seems to be to turn off Background Geoprocessing (Geoprocessing\Geoprocessing Options... then uncheck Enable in the Background Processing section), and perform the clipping operation, with Snap Raster specified, in ArcCatalog.

There is a discussion on the ArcGIS forums here: http://forums.arcgis.com/threads/50808-Another-Snap-to-Raster-problem

Apparently the bug is fixed in ArcGIS SP 4. I've installed the service pack but haven't tested yet.

Interestingly (or rather, annoyingly), if I perform the clip to my area-of-interest polygon with the Snap Raster specified (Snap Raster is DEM) as per the solution in the forum post, above, the Snap Raster works but the Landsat band has one more column and one more row than the DEM raster, which was also clipped in ArcGIS to the area-of-interest polygon. This is annoying because for further analysis I need the two rasters to have exactly the same number of rows and columns. A simple workaround is to perform a calculation with the Con() function that creates a new raster with the same number of rows and columns as the DEM, but that has the values of the Landsat band.


I actually struggled with this problem for a long time, and I found what I consider to be a very effective and fairly easy work-around. Pick one of your rasters, the one that you believe to be in the "correct" place, zoom in as far as ArcGIS will allow, and create a new point shapefile directly on top of the intersection of four raster cells. The one trick here is to be sure that you are zoomed in as far as absolutlely possible, and that you create the new point directly on top of the 'cross' formed by four raster cells. Then record the coordinates of the point that you just created. Finally, reproject your second raster (but leave the projection and output cell size unchanged), and use the coordinates of your newly created point as the "Reference Point". This will perfectly allign your two rasters. No errors, no changes to the projection, no fuss.


You could try using the masking tool to overlay the DEM with Landsat.

You may have to create a study area box in order to capture pixels that completely fall on top of each other.


Measure the gap between one raster and the other, and then shift one raster accordingly.

You can use the shift tool from data managment toolbox.


I had the same problem. I tryed Louis Longchamps solution, which worked wonderfully on a small test sample, but my dataset was just too big to use this method practically. After a looong while and many ways of trying to do this, I finally, on a whim, used the "Extract by Rectangle" after a resample, which worked just as the snap raster function in the clip tool should have worked. I set up and tried to use a model builder, but it gave me an error, so ended up having to do this one step at a time, but eventually got all of my raster's matched up.


I was not comfortable with the idea of shifting the raster because, according to me, you change the information. To avoid that, I used a sequence of conversions.

Here are the steps:

  1. For the raster you want to use as template, go in the Properties/Source and write down the Cellsize on a piece of paper with all decimals available.
  2. Convert this raster into points using Conversion Tools/Raster to Point.
  3. Extract the values from all other rasters you are interested in using Spatial Analyst Tools/Extraction/Extract Multi Values to Points, specifying the Point feature you just created (in step 2) as the input point feature and all rasters you want to sample in the Input rasters.
  4. Create the rasters from these points one by one using Conversion Tools/To Raster/Point to Raster, specifying which layer you are creating in the Value field and using a corresponding file name AND the Cellsize value you wrote down on the piece of paper.

They should align perfectly and you can transfer these to R for instance and have matrix and vectors of the exact same dimensions.

  • 1
    A raster "shift," properly carried out, merely changes two numbers: the x and y coordinates of its origin. That makes it an extremely efficient reliable operation that changes none of the data in the raster.
    – whuber
    Commented Apr 19, 2013 at 12:49
  • I agree with Louis that changing the origin/position of the raster changes the information! Sure it's efficient, but the value of the raster cell might not be "correct" if you change it's position (especially if your "merely shifting" by quite a bit... imagine translating any data a few meters to the left...). Yet I don't see how the conversion to points is circumventing this. In my opinion resampling (e.g. bilinear) would be correct. But: In practice, a minor shift of the origin might be just as accurate, since resampling is just an approximation an each method has it's own problems, too.
    – Honeybear
    Commented Nov 3, 2020 at 13:16

We were so much worried about our DEM image it was also not aligned to the supervised classified raster image. We have also used the method of "Matthew Long".

we have added the snapshots of non-aligned and aligned images.

After the method by Matthew Long our DEM image was totally aligned with our supervised classified raster image.

This is image of the tool we used for aligning our DEM image, in ARCGIS 10.2.1 in Data Management tools:

enter image description here

This is the image before aligning, black image is DEM and colored image is supervised classified raster image.

enter image description here

This is the image after aligning, black image is DEM and colored image is supervised classified raster image.

enter image description here


I solve my problem with the method of "Matthew Long". However, to make it even more easier and 100% accuracy. Without any zooming, just use the Top left extent coordinate of the good aligned raster.

To do so: Right click, property, Source panel under Extent property

Also, using the top left extent coordinate, it's possible to creates a python solution without manual interventions.


I had a similar problem having two files from different sources. First, a raster file for the reference level of deforestation at the country level (Peru). Second, a consolidated file on the GEE platform downloaded and reprojected to the first element system. In conclusion, the overlap of both showed me that there was a displacement between cells (30 * 30 cell) no greater than 5 meters. In order to align and adjust the second file to the first one, it occurred to me to establish an * extended base of the first file that can cover both files * and maintain the pixel alignment of the first file with its projection system and other features. Thus, at the time of reprojecting my second file or any by-product with a similar offset, I include it as a base in * snap raster * my area of ​​extended interest and with it I had all my files aligned vertically and horizontally.

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.