mzcoyle

Buffer in Meters

Discussion created by mzcoyle on May 17, 2011
Latest reply on May 18, 2011 by mzcoyle
Hi all, I am trying to do a simple buffer on a point feature based on a calculated field in meters based on the area. However, the spatial reference is in WGS lat/long and will only take the field units as decimal degrees it seems. Is there a way to specify the field as a meter buffer in a lat/long feature? Or would I need to project it to something that will take meters?

How I was doing it before was to select each feature as it goes through the cursor and buffer that to a separate feature then merging them together.

Here is my code so far below. Tips, hints, suggestions?

import arcpy, math


ws = r"C:\GIS\Fires"
arcpy.env.workspace = ws
fires_in = r"fires1.shp"
pi = math.pi

field_list = arcpy.ListFields(fires_in)
for field in field_list:
    print field.name

rows = arcpy.UpdateCursor(fires_in)
for row in rows:
    area = row.Burned
    buffer_dist = math.sqrt((area*10000)/pi)
    row.Buffer = buffer_dist
    rows.updateRow(row)
    #arcpy.Buffer_analysis(fires_in, "fire"+name+".shp", str(buffer_dist)+" Meters")
    
arcpy.Buffer_analysis(fires_in, "fire_buffer.shp", "Buffer")    


del rows
del row
del field_list
del fires_in

Outcomes