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)
Solved! Go to Solution.
Needed to save the output to a .gdb to get it to clip correctly.
Hi Robert,
Try setting the clipping_geometry to "ClippingGeometry" instead of True.
Needed to save the output to a .gdb to get it to clip correctly.