Make rasters have the same number of columns and rows

6834
2
07-12-2016 10:21 AM
CarinaZacharias
New Contributor III

Hi,

for use of the "Map Comparison Kit" the raster maps that I want to compare need to have the same number of columns and rows and the same cell size. So, I have been using the Clip tool to clip the smaller one by the bigger one, also setting Environment (Processing Extent to the extent of the raster that I used to clip with and raster Analysis to the cell size of the raster I clip with). But there is no change. Same goes for Extract by Mask.

Any ideas why it isn't working?

Cheers!

2 Replies
DanPatterson_Retired
MVP Emeritus

you can only clip the bigger one using the extent of the smaller.  If you want the smaller one to have the same extent as the bigger one, you have to set the raster properties to that of the bigger one, then right click on the smaller raster and export it.  This will result in the smaller raster having a larger extent... but surrounded by nodata values.  This makes it pretty well useless since nodata cells are ignored in most analyses anyway, so, click/export the bigger to the extent and cell size of the smaller.  It would also be a good idea to use the smaller raster as the snap raster to ensure that the cell edges align with the smaller raster as well

DarrenWiens2
MVP Honored Contributor

You can also use the SetNull tool to expand the NoData region around the smaller raster to the extent of the larger raster. Set the Output Extent and Snap Raster environments to the larger raster, and use a Raster Calculator expression like:

SetNull(IsNull("small_ras"),"small_ras")