AnsweredAssumed Answered

Creating buffer with Python

Question asked by howelltodd on Apr 9, 2014
Latest reply on May 8, 2014 by iamurray
I am very new to python, and am trying to utilize a stand alone script that I can use on a working geodatabase full of feature classes in various feature datasets. Here's what I'm trying to accomplish, and the script that I have constructed.

1. I have a file geodatabase full of feature datasets based on county, inside of the county feature datasets I have feature classes that represent the center of aerial photography flight lines. These feature classes have a field that contains the flight height of the photography.

2. I have constructed a script that so far is unsuccessful at what I want it to accomplish. My goal is to have a script that will batch process all of the feature classes in the geodatabase, will create buffers of the lines contained in those feature classes based on the flight height field which needs to be multiplied by a factor of 1.502167099846. Then output into my separate geodatabase that will contain those photo coverages for use with an ArcGIS online map service.

Here is the script that I have constructed thus far:

 # Name: Flight_Line_Buffer.py # Description: Creates area of Aerial Photography coverage based on digitized flight lines, and associated flight height field in flight line table.  #Import system modules import arcpy from arcpy import env  # Set environment settings env.workspace = "J:\Flight_Lines_GDB\Flight_Lines_Coverage.gdb" env.Outworkspace = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb"  # Create buffer distance output from Flight Height field, and buffer flight lines Flightlines = "J:\Flight_Lines_GDB\Flight_Lines_Coverages.gdb" PhotoCoverages = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb" distanceField = "Flight_Height" sideType = "FULL" endType = "FLAT" dissolveType = "NONE" arcpy.Buffer_analysis(Flightlines, PhotoCoverages, distanceField, sideType, endType, dissolveType) 


Things I know.
- I cannot just input the geodatabase as an input in the buffer tool, but I am unsure how to accomplish a loop or the like to process through all of the feature classes in the geodatabase.
-I cannot multiply a the field that I want to input as the buffer distance by a number either when I am defining it or in the tool parameters.
-I am a bit in over my head, and I am very very thankful for anyone with the patience and gracious nature to help me in any way.

Thanks for looking at this, I appreciate any help you can give.

Todd Howell

Outcomes