ClipRaster

3825
2
Jump to solution
03-23-2015 11:37 AM
RobertRossell1
New Contributor II

Can't seem to get this to clip to the geometry boundary of the .shp file.  Instead, its clipping to the max extent.  Can anyone tell me why?

import arcpy

shp = r'C:\Users\Robby\Desktop\Project_3\hydrologic_unitsHUC8\wbdhu12_a_al089.shp'

raster = r'C:\Users\Robby\Desktop\Test\final_mosaic.tif'

arcpy.Clip_management (raster,

                       in_template_dataset = shp,

                       out_raster =  r'C:\Users\Robby\Desktop\Test1\newclip2.tif',

                       clipping_geometry = True)

0 Kudos
1 Solution

Accepted Solutions
RobertRossell1
New Contributor II

Needed to save the output to a .gdb to get it to clip correctly.

View solution in original post

2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Robert,

Try setting the clipping_geometry to "ClippingGeometry" instead of True.

0 Kudos
RobertRossell1
New Contributor II

Needed to save the output to a .gdb to get it to clip correctly.