Batch Clip and Reprojection tool for DEM Data

Discussion created by wmarcell on Jul 13, 2011
Latest reply on Jul 19, 2011 by wmarcell
I have used these forums quite a bit and thought I would provide some code that I have written.  It is designed to have 4 variable inputs:
- A directory to write output data to
- A Raster input (in my case 30m national DEM dataset)
- A shapefile with multiple point or polygon features each of which will be buffered and used as a clipping boundary
- Output Coordinate system

In the loops there is a field named "ID" that the output rasters will be named based on.  This will probably need to be changed to whatever field you will use to name your output raster files.

This script can of course be modified to accept other raster inputs (keep in mind the output cell size in the reprojection) and to change the buffer size and feature envelope (if you dont want a squared off output).

Our desired output needed to be in a projected coordinate system with no border pixels (for histogram analysis).  Thus a double clip was used before and after the projection.

The script is set to erase all temporary files and all of the pyrimid etc. files at the end.  This can also be modified.

I hope that this helps someone that is trying to do a similar clipping process using ESRI's GP capabilities.