# 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)
Solved! Go to Solution.
# 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 PhotoCoverages = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb" fdOutput = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb" #fetches all feaure datasets in workspace into a list fdlist = arcpy.ListDatasets() # loop through feature datasets in the list for fd in fdlist: #setting new workspace to the feature dataset we are using env.workspace = fd arcpy.CopyManagement(fd , fdOutput + "/" + fd) # fetches all feature classes in workspace into a list fclist = arcpy.ListFeatureClasses() #loop through feature classes in our list for fc in fclist: FCOutput = fdOutput + "/" + fd distanceField = "Flight_Height" sideType = "FULL" endType = "FLAT" dissolveType = "NONE" multiplier = 1.502167099846 cursor = arcpy.SearchCursor(fc) count = 1 for row in cursor: distance = ((row.getValue(distanceField))*(multiplier)) arcpy.Buffer_analysis(fc, FCOutput + "/" + fc + "_Buffer" + str(count) , distance, sideType, endType, dissolveType) count += 1 del row del cursor
# 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 PhotoCoverages = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb" fdOutput = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb" #fetches all feaure datasets in workspace into a list fdlist = arcpy.ListDatasets() # loop through feature datasets in the list for fd in fdlist: print fd #setting new workspace to the feature dataset we are using arcpy.CopyManagement(fd , fdOutput + "/" + fd) env.workspace = fd # fetches all feature classes in workspace into a list fclist = arcpy.ListFeatureClasses() #loop through feature classes in our list for fc in fclist: FCOutput = fdOutput + "/" + fd distanceField = "Flight_Height" sideType = "FULL" endType = "FLAT" dissolveType = "NONE" multiplier = 1.502167099846 cursor = arcpy.SearchCursor(fc) count = 1 for row in cursor: distance = ((row.getValue(distanceField))*(multiplier)) arcpy.Buffer_analysis(fc, FCOutput + "/" + fc + "_Buffer" + str(count) , distance, sideType, endType, dissolveType) count += 1 del row del cursor
# 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 PhotoCoverages = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb" fdOutput = "J:\Aerial_Photo_GDB\Aerial_Photography_Coverage.gdb" #fetches all feaure datasets in workspace into a list fdlist = arcpy.ListDatasets() # loop through feature datasets in the list for fd in fdlist: print fd #setting new workspace to the feature dataset we are using arcpy.CopyManagement(fd , fdOutput + "/" + fd) env.workspace = fd # fetches all feature classes in workspace into a list fclist = arcpy.ListFeatureClasses() #loop through feature classes in our list for fc in fclist: FCOutput = fdOutput + "/" + fd distanceField = "Flight_Height" sideType = "FULL" endType = "FLAT" dissolveType = "NONE" multiplier = 1.502167099846 cursor = arcpy.SearchCursor(fc, ["distanceField"]) count = 1 for row in cursor: distance = float(row[0])*(multiplier)) arcpy.Buffer_analysis(fc, FCOutput + "/" + fc + "_Buffer" + str(count) , distance, sideType, endType, dissolveType) count += 1 del row del cursor