Select to view content in your preferred language

Buffer Analysis using arcpy

2416
2
11-14-2021 10:14 AM
Abdulqadoos
Deactivated User

I am looking for a piece of code which help me in converting my road centreline feature to a buffer. I have the following feature classes.

roads = "c:/base/data.gdb/roadcentreline"
roadsoutput = "c:/base/data.gdb/roadcentreline_Buffer"

Now, I want to convert this into buffer and store it in the roadsoutput. Any way to achieve this?

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

Did you see the code examples in the help?

Buffer (Analysis)—ArcGIS Pro | Documentation


... sort of retired...
ArcProOne
Occasional Contributor

I would do something like:

temp = 'memory\\buffer'
arcpy.analysis.Buffer(roads, temp)
arcpy.management.Append(temp, roadsoutput)
arcpy.management.Delete(temp)

 and add all the other needed parameters to each function.

0 Kudos