Get identical extent for multiple rasters

748
4
Jump to solution
11-03-2021 11:27 AM
NPersh
by
New Contributor

I need to have several rasters with the exact same extent so I can create a raster stack with them in R. Theoretically this should be simple and I should be able to clip them all using the same clip feature and their extents will be identical. Unfortunately, this is not working. I have a polygon I'm using to clip them, using Clip Raster, but after clipping when I check the extent it's not the same as the clipping polygon, and my different rasters have different extents after using the exact same polygon to clip them. They are off by a handful of meters, and to the eye look identical, but they are not. Any insight into what's happening here would be appreciated. 

Alternatively, is there a way to manually input the extent for a raster? I don't care if the edges have "NODATA" I just need them to all be the same so R will stack them. 

I'm running ArcGIS Pro 2.8.2, and all rasters are in the same projected coordinate system. 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JayantaPoddar
MVP Esteemed Contributor

You could run Clip Raster in batch.

Ensure you check the following check-boxes.

JayantaPoddar_0-1635964949600.png

In Environments, ensure you choose one of the Raster layers as Snap Raster.

JayantaPoddar_1-1635965088079.png

 



Think Location

View solution in original post

0 Kudos
4 Replies
JayantaPoddar
MVP Esteemed Contributor

You could run Clip Raster in batch.

Ensure you check the following check-boxes.

JayantaPoddar_0-1635964949600.png

In Environments, ensure you choose one of the Raster layers as Snap Raster.

JayantaPoddar_1-1635965088079.png

 



Think Location
0 Kudos
NPersh
by
New Contributor

I tried this and it did a lot better than what I had before, but the bottom extent is off by exactly 30m (which is the size of my cells), so I'm missing one row of cells along the bottom. Any clue why that would be happening? I kept trying different ways using a new clipping feature and then started getting errors, either:

ERROR 999999: Something unexpected caused the tool to fail. Contact Esri Technical Support (http://esriurl.com/support) to Report a Bug, and refer to the error help for potential solutions or workarounds.

or

ERROR 160326: The table already exists.

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

"table already exists"   .... use new output names

There are numerous things that need to be considered when trying to clip disparate rasters to align and have the same extent

Cell Alignment (Environment setting)—ArcGIS Pro | Documentation

Cell Size (Environment setting)—ArcGIS Pro | Documentation

if a projection is involved.... Cell Size Projection Method (Environment setting)—ArcGIS Pro | Documentation

and as mentioned....

Snap Raster (Environment setting)—ArcGIS Pro | Documentation

Then finally see the two topics starting here

How the Cell Size Projection Method environment setting works—ArcGIS Pro | Documentation

 

It can be a bit of a pain, but you need to ensure that all are considered and setup before considering the batch option.. Nothing works better than narrowing down the corner-cases where things don't go well first


... sort of retired...
0 Kudos
CaraJoos
New Contributor

This is not a solution I have done all of these things and I am still having the same problem and have done all of the above yet the clipped rasters do not have the same extent as raster used to clip the batch.

What are corner cases?

There are no Cell properties settings in the environments for this tool. I do not get to choose size, alignment or projection options for cells. 

 

You can see in this screen shot the projection of the clipped batch and what was specified.

 

Any more suggestions?

 

 

0 Kudos