I have a polygon grid file and want to clip my raster imagery to the shapes outlined by it. I am using arcmap and was wondering if there was a tool directly for this? I would like to also be able to name each resulting raster for the polygon feature it was clipped to.
2 Answers
I would use model builder for this. Use the feature iterator to cycle through each polygon and feed that into the clip raster tool. You would use in-line variable substitution to pass the polygon ID or unique name you used in the iterator to the output name of your new clipped raster.
Here is the model:
If you don't know anything about model builder, time to read the Help file!
-
thanks. i know model builder, i was just wondering there was a tool that did it without designing my own.– jtgisJul 20, 2015 at 17:32
-
1Surely 'Extract by Mask (SA)' would be better than Clip. Clip creates a rectangular polygon defined by an extent but Extract by Mask will extract an irregular polygon (nodata outside)... that is of course if you have Spatial Analyst extension, if you don't you're stuck with Clip. GoMapping, there is no tool that does this 'out of the box', your only option is to use a model or python script (I wrote one a few years ago because there was no tool to do this). Jul 20, 2015 at 22:01
-
The Clip tool has a parameter called clipping geometry, if this is ticked on then it uses the polygon and not it's minimum bounding box. So the model I suggest could take a grid of polygons or clip to the shape of the polygon. Come to think of it @gomapping should ensure the snap raster environment setting is set to ensure everything lines up.– HornbyddJul 20, 2015 at 23:19
Split raster does this, even keeps polygon geometry
it chops single raster into bits and uses polygon geometry. Output base name is updated by seq.number, as always it is a 'bad' numbering i.e. image1, image2 etc while it should be image01, image02 etc if number of polygons > 9 and < 100. Would be helpful with sorting by name. Apart from this - great tool
These 3 are different rasters chopped from a big one:
-
hmmm....i don't get the POLYGON_FEATURES option from the split method drop down. I have arcinfo. Do you know if it is linked to an extension?– jtgisJul 20, 2015 at 20:40
-
1
-
1Split raster 10.2 resources.arcgis.com/en/help/main/10.2/index.html#//… prior to this version only SIZE_OF_TILE and NUMBER_OF_TILES options are supported. Not sure how that works whether it's by unique attribute or by polygon, I guess try it and see. Felix can you extend your answer a little about this new functionality. Jul 20, 2015 at 22:07