How do I clip a raster with a polygon in ArcGIS 10?

244905
41
Jump to solution
09-03-2010 01:42 PM
JennSmithyman
New Contributor II
I have always used Hawth's tools (I have 3D Analyst not Spatial Analyst), but with the upgrade the tools disappeared....  Can I still get Hawth's tools to work with 10 or is there a function to clip by polygon that I missed?

I have approx. 100 images that I need to clip to field boundaries (polygon layer).

Thank you.
Tags (1)
41 Replies
EricRice
Esri Regular Contributor
You select the raster you want to Clip/Mask in the Image Analysis window (IAW), from the list of rasters.  You also select a polygon (feature class polygon), and then just hit the Clip or Mask button in the IAW.  The layer is temporary by default.
0 Kudos
JuliaSmith
New Contributor
Thank you Mark and Eric, those steps worked for me! I appreciate your assistance.
0 Kudos
MarkMcPherson1
New Contributor II
I remember why I had the problem: although I can see the Raster, I cannot figure out how to add the polygon part.[ATTACH=CONFIG]15010[/ATTACH]


You select the raster you want to Clip/Mask in the Image Analysis window (IAW), from the list of rasters.  You also select a polygon (feature class polygon), and then just hit the Clip or Mask button in the IAW.  The layer is temporary by default.
0 Kudos
JeffreySwain
Esri Regular Contributor
You have to 'select' it with the Select button, unless you have changed it, the selection should be cyan blue.   Here is the documentation on how to select the polygon feature.
0 Kudos
MarkMcPherson1
New Contributor II
Okay, I followed and it worked.... sorta.  As per img1, I was successfully able to create a temporary masked layer [ATTACH=CONFIG]15028[/ATTACH]


As per img2, I exported it to a permanent layer (note: both my raster & polygon layers use NAD83 UTM 11) [ATTACH=CONFIG]15029[/ATTACH]

But on img3, notice that the bottom portion of my image is "cut off" somehow [ATTACH=CONFIG]15030[/ATTACH].
I'm not worried about the "fringed" effect on the right-hand side of the image, as that's another problem (I originally used Extract by Mask to reduce the size of the original raster... and for some reason, while it did produce a smaller-size raster, it added those fringes on the right... I dunno!)


Andrea,

You can use the Mask button on the Image Analysis Window in ArcGIS 10. 

Image Analysis window: Processing section

Regards,
Eric
0 Kudos
EricRice
Esri Regular Contributor
Mark,

You could try Copy Raster instead of Data > Export to see if that is a viable workaround.  I can't reproduce the issue you are experiencing, but it certainly looks like a bug.

Eric
0 Kudos
AnneMarcotte
New Contributor
Don has the correct workflow.  Use the clip under Data Management > Raster > Raster Processing. If you do not specify the input geometry, you will receive the bounding extents of the polygon.  The output format of the raster is controlled by adding extensions. So .jpg for jpeg, .tif for tiff and so forth.  The only limit is the raster to be output must have the band combination/bit depth for the desired format. 

Extract by Mask will also perform the clip, but Spatial Analyst is required.


Hi There,
I followed this process exactly, using a shapefile of a country as the clip for an raster hillshade layer. According to the Results dialog box, the clip performed successfully...However, the .png file that I tried to save did not appear in the directory I specified, nor anywhere else on my computer. Do you have any insights?
0 Kudos
JeffreySwain
Esri Regular Contributor
What is the input format prior to the clip?  If it is trying to create a 32 bit raster then that is the problem.  I would stick to a .tif, Esri GRID or .img format. PNG is usually not an output format for hillshades.  Check the Supported Raster Formats for ideas on format and look at .png and notice that you can only have certain output formats.
0 Kudos
WilliamFrament
New Contributor
I would like to clip a raster image with a shapefile of 1:100,000 usgs quads and have the images named with an attribute within the shapefile? Any way to set this up to run and clip serveral at once and have them named?
0 Kudos
JeffreySwain
Esri Regular Contributor
You could iterate through the feature classes and clip each one and apply the name that way.  I would recommend looking at the information on iterators and in line variables in model builder or consider scripting it in python.  The name of the feature being used could be used in the naming that way.
0 Kudos