I have some feature classes (7 feature classes) and I want to batch buffer in ArcGIS 10. I don't know how can I buffer at once. Please help me.
ArcGIS 10.0 Python – Batch Buffering with ArcPy
arcgis-10.0arcpybufferpython
arcgis-10.0arcpybufferpython
I have some feature classes (7 feature classes) and I want to batch buffer in ArcGIS 10. I don't know how can I buffer at once. Please help me.
Best Answer
To buffer several features, you need to use some control structure. A technique I have found very useful is to store all of the shapefiles you are using in one folder, then loop through everything that is a shapefile. I do this using the
glob
module, as follows:(See ArcGIS help here for more details)
I'm using an awkward way of naming the buffered file here (
shapefile[-8:-4]
); a better way is to set the workspace using something likearcpy.env.workspace = "C:/data"
.