a guest Jun 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- #use 'CURRENT' if running from arcmap, when published use MXD on disk
- mxd = arcpy.mapping.MapDocument(workspace+"\working_environment.mxd")
- df = arcpy.mapping.ListDataFrames(mxd) # address location data frame and turn on select layers
- arcpy.env.extent = df.extent #set extent to current one
- arcpy.env.overwriteOutput = True #overwrite existing files
- my_point_features = autoLayerGDB +"\coded_xy_points_FIPS4203"
- scratch_output = workspace+"scratch"
- #Select each district via script
- for i in range(1, 11):
- my_clause = 'COUNCILDISTRICT = %d' % i
- my_filename = "kden_d%d" % i
- selection_subset = arcpy.MakeFeatureLayer_management(my_point_features, "templayer", where_clause=my_clause)
- outKDens = KernelDensity("templayer", "None", cell_size=100)
- print("tRaster created for District %d" % i)
RAW Paste Data