[GIS] Multiple ring buffer with attributes

arcgis-desktopbuffer

Building on Inside buffer with attributes in ArcGIS?, I'd like to be able to create multiple ring buffers, while retaining (and possibly dissolving on) attribute values. How can this be done?

Best Answer

OK, how I did this, is loop through creating ring buffers on objects, and saving the output as a new featureclass in a standlone datasets collection. I then merged the featureclasses, like so:

tmp_merge = "path to area"\+ "tmp_merge"  
final_out_path_agg = final_staging + "_Agg"
final_out_path_simp = final_staging +  "_Simp"

#check if files exist and delete if they do; assume nothing
if (arcpy.Exists(tmp_merge)):
    arcpy.Delete_management(tmp_merge)   

#set up folder to search for polygon data
arcpy.env.workspace = scratchDB + "mytmpBuff.gdb/Polygons/"
#collate FC
fcs = arcpy.ListFeatureClasses()
L = []
count = 0
try:
    for fc in fcs:
        #append to array ready for merging
        L.append(fc)
        count = count + 1
except:
    print "Error collating FeatureClasses."

try:
    if count > 1:
        arcpy.Merge_management(L, tmp_merge)
    elif count == 0:
        arcpy.AddMessage("No FeatureClass Polygons located.")
        arcpy.AddMessage("Error collating FeatureClasses.")
        sys.exit(-1) 
except:
    arcpy.AddMessage("Error merging FeatureClasses.")   

Then dissolved them

#overlaps dissolved
arcpy.Dissolve_management(tmp_merge, final_out_path_agg, "Name", [["RunID","FIRST"],["AltiLwr","FIRST"],["AltUpr","FIRST"],["TimeSl","FIRST"],["ConcentrationBand","FIRST"],["ConcLvl","FIRST"],["IsC","FIRST"]])  
arcpy.DeleteField_management(final_out_path_agg, "NAME") 

The buffers are created in a loop and stored in arcpy.env.workspace = scratchDB + "mytmpBuff.gdb/Polygons/" before I later loop through them.

It works, or it does if I have understood your issue correctly!

Related Question