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?
Answer
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.
No comments:
Post a Comment