AnsweredAssumed Answered

Buffer Analysis

Question asked by CCweedcontrol on Sep 23, 2016
Latest reply on Sep 23, 2016 by Dan_Patterson

I am trying to create multiple buffer rings of 1 mile and 2 mile for a polygon. I tried the MulipleRingBuffer Analysis but it take about 2 minutes to do 2 buffer rings. so i am trying the buffer analysis. I have the following script, it creates the 1 mile and the 2 mile feature classes but it's on the outline of the subject polygon . I do not get an error but some how i am not correctly getting what i am after, any help would be great.

 

import arcpy, os

mxd = arcpy.mapping.MapDocument("CURRENT")
lyr = arcpy.mapping.ListLayers(mxd, "SUBJECT_PROPERTY")[0]
#lyrpath = lyr.workspacePath
arcpy.env.workspace = os.path.dirname(mxd.filePath)
wp = os.path.dirname(mxd.filePath)

try:
    SP = "SUBJECT_PROPERTY"
    lyr.replaceDataSource(wp, "SHAPEFILE_WORKSPACE", SP, True )
except:
    pass

if arcpy.ListFields(SP, "BUFF_DIST"): 
     print "Field exists" 
else: 
    arcpy.AddField_management("SUBJECT_PROPERTY","BUFF_DIST","TEXT",10)

arcpy.RefreshActiveView()
arcpy.RefreshTOC()

distances = [1, 2]
for distance in distances:
    outfile = "wp%s" % distance 
    arcpy.Buffer_analysis(SP, outfile, distance, "OUTSIDE_ONLY", "ROUND", "LIST", "BUFF_DIST")

Attachments

Outcomes