1

If I use the standard buffer tool in ArcMap, I can set the units for the buffers. I'm trying to execute a python script to do the same thing, but the resulting buffers are huge and incorrect, indicating that the units are wrong. Is there a good way to set the units in the script, or is this just the result of the projection I'm using? My data is all being projected into a state plane system using feet, but the feature I'm trying to buffer is in WGS 1984 (degrees).

I tried to research a bit but didn't find much.

#assign variable bus routes
routes = r"C:\Users\bobby\Desktop\gis data\Bus redesign.gdb\BusRoutes"
buffDists = [300, 600, 900]
#create arcpybuffer

for buff in buffDists:
    arcpy.Buffer_analysis(routes, routes + str(buff), buff)
    print (str(buff) + " is processing")

print("script complete")    
5
  • If you follow the documented parameter list, you could add the units to the distance and specify that a GEODESIC calculation is needed. ...,"{:d} feet".format(buff),method='GEODESIC')
    – Vince
    Apr 30, 2020 at 20:02
  • Could you please confirm that routes is in a projected coordinate system, rather than a geographic coordinate system?
    – Aaron
    Apr 30, 2020 at 20:05
  • @Aaron, it's not, and maybe that's the issue. I know how to project it into the data frame as state plane but not how to change the coordinate system that came with the data..
    – Mark
    Apr 30, 2020 at 20:11
  • @Vince that was super helpful and seemed to work but adding the change seemed to cause WinPy to hang and not respond. If I shut it down and check the output geodatabase, 2 out of the three buffer distances are there. Any advice?
    – Mark
    Apr 30, 2020 at 21:38
  • As long as the data is in a projected coordinate system, you will not have issues with the buffer distances.
    – Aaron
    May 1, 2020 at 14:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.