How can I clip a raster to the outlines of a polygon?

4900
9
12-27-2016 04:05 PM
PaulHuffman
Occasional Contributor III

I thought I could trim an elevation raster to the outline of a non-rectangular. polygon with Copy Raster if I used the polygon as a mask in the environments, but I just got the entire raster in the output.  And I don't see Mask in the Environments section of the help for Desktop 10.3.1.  

I thought I had done this before.  The only way I could figure out how to do it was create a new terrain out of the multipoints I have for the  smaller extent, and use the mask polygon as a soft clip in the terrain generation.  The I ran Terrain to Raster.  Is this the only way? 

Tags (1)
0 Kudos
9 Replies
PavanYadav
Esri Contributor

There are many ways to clip out a part of an image or raster in ArcGIS. You can read this blog:

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Pavan, I think you forgot to paste the link to the blog.

0 Kudos
PavanYadav
Esri Contributor

Thank you Rebecca Strauch, GISP.  I missed to include the link to the blog. It is: Clipping an image or raster in ArcGIS | ArcGIS Blog.

PaulHuffman
Occasional Contributor III

Data > Export Data - Using Selected Graphics (clipping)

looks like it might work but the Selected Graphics radio button is grayed out.  There must be something I don't understand about the Selected Graphics concept.  I have tried having my clip polygon FC on the map and selected. Instead of a FC,  is selected graphics supposed to be a graphics sketch? A search for "selected graphics" doesn't help me.

Yesterday, Help lead me into the Image Analysis Window,  but I was having trouble using it.  

PaulHuffman
Occasional Contributor III

Oh, I see, I needed to take the additional step of running my FC polygon mask through Convert Features to Graphics,  then the option to use selected graphics worked to clip the elevation raster non-rectangularly, even though selecting the graphic showed rectangular handles around the graphic.   I had trouble figuring out what to do with the graphic that was on top of the clipped raster, had to remove it, because putting it to the back didn't put it under the raster.   

And I think I see how I could do the same thing in the Image Analysis window.  But, man, I had a hard time spotting the  Export button in the Image Analysis window.  It's under Processing. 

JayantaPoddar
MVP Esteemed Contributor

Try Clip—Data Management toolbox | ArcGIS for Desktop  or Extract by Mask—Help | ArcGIS for Desktop.

While using Clip tool, ensure to select ClippingGeometry.



Think Location
PaulHuffman
Occasional Contributor III

I was aware of the Clip tool,  but didn't want to use it because my clip area was not rectangular.  Extract by mask was something new,  but it looks like I would need an additional step of rasterizing my clip polygon. 

0 Kudos
AbdullahAnter
Occasional Contributor III

Sorry,Paul Huffman . But Clip tool not only for rectangular extent but also for various polygon shapes.

see Clipping_geometry in the link that  Jayanta Poddar reply (  Clip—Data Management toolbox | ArcGIS for Desktop ).

PaulHuffman
Occasional Contributor III

Thanks, that worked too! 

I was so surprised that it didn't work with Copy Raster setting a mask in the environmental variables. I thought that is how I had clipped to an irregular polygon in the past.   But I can't find any mention of Mask in the list of Environments in the tool help.  I must have been thinking about using a mask with Spatial Analyst tools, like surface toolsets. 

0 Kudos