Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

What can I do? If this is not possible in ArcGIS, I'd appreciate a solution using Python-GDAL or SAGA-GIS.

enter image description here

share|improve this question
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 Sep 24 '12 at 6:05
1  
@om_henners: apparently the issue is a bug in ArcGIS 10. See my answer below. –  npo Sep 25 '12 at 2:59

6 Answers 6

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. Again we are very much thankful to Matthew Long for providing their suggestion. 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

Regards: Anila, Nabila.

share|improve this answer

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...
Hope this helps... Louis

share|improve this answer
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 Apr 19 '13 at 12:49

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. Hope this helps. :)

share|improve this answer

can you 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.

share|improve this answer
up vote 3 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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