ajbaker

Clipping a GRID file (input raster) to a Shapefile (Clip Extent)

Discussion created by ajbaker on May 9, 2011
Latest reply on May 12, 2011 by ajbaker
Hi,

I am using ArcGIS 10.0 and am trying to clip GRID files to a shapefile boundary. I can do this easily in ArcMap using Data Management Tools > Raster > Raster Processing > Clip. However when it comes to python I get an error about my inFolder. Because GRID files don't have a .shp, .tif etc. at the end do I have to add something else to my script? Thanks!

import arcpy

inFolder = "C:/Documents and Settings/someone/Desktop/Data/tmin_01"
resultsFolder = "C:/Documents and Settings/someone/Desktop/Data/output"
clipFeature = "C:/Documents and Settings/ajbaker/Desktop/PRISM_Trial/Boundary/Hydrographic_GB_boundary.shp"

arcpy.Clip_management("inFolder", "#", "clipFeature","resultsFolder", "0", "ClippingGeometry")

Outcomes