# Author: John Lowry # Date: Jan. 15, 2008 # Purpose: Lesson 2b example of a simple python sript ############################################################# # Import the arcgisscripting module import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() # Set the current workspace & set overwrite on gp.workspace = "C:\john\TeachingGIS\WILD6900_ArcGISPython\Lesson2_results" gp.overwriteoutput = 1 # Select Red Butte Creek gp.select_analysis ("flowline.shp", "RBCreek.shp", ' "GNIS_NAME" = \'Red Butte Creek \' ') # Buffer the selected creek gp.buffer_analysis ("RBCreek.shp", "RBCreekBuff.shp", "100 feet") #Convert bufferarea to raster gp.PolygonToRaster_conversion("RBCreekBuff.shp", "FID", "BuffGrd", "CELL_CENTER", "NONE", "30") #Free Memory del gp