Ask A Cartographer

How can I clip a raster dataset?

January 22 2009 | 4 comments
Categories: ArcGIS Methods, Map Data

Hy there,
..new in the domain
I've created a buffer feature of 7 km from a main road...and I want to clip a mosaic(made up of 6 scanned georeferenced maps) based on that buffer. Can that be done?
Thank you for your help

Mapping Center Answer:

The Clip tool is what you need. 

I was really tempted to leave the answer so short.  But it is worth noting that "Clip" is a rather ambiguous tool name in ArcGIS.  There is a "Clip (analysis)" tool that most "vector" people know and love.  But there is also a "Clip (Data Management)" tool that does the raster clipping. 

Raster analysis settings posted by Aileen Buckley on Jan 26 2009 1:38PM
You can also accomplish this by specifying the buffer feature as the Analysis Mask in the raster analysis environment settings, but the suggestion above is better if you are doing work outside the buffer as well, and if you want the clipped raster to be permanent.
Tried and tested posted by Alan Boatman on Jan 26 2009 6:48PM
I have always had a bit of a problem getting raster clipping tools to work well for me. The method that seems to work very well every time is this:
Import your raster and import your clip polygon (or make a new one e.g. for your area of study).
In Spatial Analyst go down to Options.
On the 'General' tab set the Analysis Mask to 'Your_Clip_Polygon'
On the 'Extent' Tab set the Analysis Extent to Same as Layer 'Your_Clip_Polygon'
Still on the 'Extent' Tab set the Snap Extent to 'Your_Raster_file'
On the Cell Size set the Anlysis Cell Size to Same as 'Your_Raster_file'
Once this is done go to 'Raster Calculator' and for the Expression just just double click on your Raster layer in the 'Layers' window and it will be entered in the box below, then click 'Evaluate'. What this does is calculate a new Raster with exactly the same values as your input raster but only within the area confined by your polygon file.
This may seem quite labourious, but actually gets quite quick after you get used to it. It works very well. You just have to make sure that both your Polygon and your Raster are in the same Projection. It doesn't work if one of your files has been projected on the fly to display on the map.
PS posted by Alan Boatman on Jan 26 2009 6:51PM
Oh yeah, and then make the Calculation permanant by right clicking the Calculation in the Table of Contents > Data > Make permenant.
Detailed directions for using the Analysis Mask posted by Aileen Buckley on Jan 27 2009 9:20AM
The steps that Alan described are the detailed directions for setting the Analysis Mask. By setting all of the options he describes, you will be sure to have the same raster resolution as your input data and extent as the polygon.

If all you add to a new data frame are 1) the raster, then 2) the polygon, then you can pretty much just set the Analsyis mask and then follow the steps he outlines about using the Raster Calculator.

And making the data permanent, if you want it to be around for use later! :-)

Thanks for the details, Alan!

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |