Buffer

Titleā€ƒ Buffer

Summary

Geoprocessing tool that creates buffer polygons around input features to a specified distance.


Illustration

Buffer illustrationBuffer illustration

Usage


Syntax

ParameterExplanation
in_features

The input point, line, or polygon features to be buffered.

out_feature_class

The feature class containing the output buffers.

buffer_distance_or_field

The distance around the input features that will be buffered. Distances can be provided as either a value representing a linear distance or as a field from the input features that contains the distance to buffer each feature.

If linear units are not specified or are entered as Unknown, the linear unit of the input features' spatial reference is used.

Code Samples

Buffer example 1 (Python window)

The following Python window script demonstrates how to use the Buffer tool.


import arcpy
arcpy.env.workspace = "C:/data"
arcpy.Buffer_analysis("roads", "C:/output/majorrdsBuffered", "100 Feet", "FULL", 
                      "ROUND", "LIST", "Distance")

                    

Buffer example 2 (stand-alone script)

Find areas of suitable vegetation that exclude areas heavily impacted by major roads.


# Name: Buffer.py
# Description: Find areas of suitable vegetation which exclude areas heavily 
# impacted by major roads

# import system modules 
import arcpy
from arcpy import env

# Set environment settings
env.workspace = "C:/data/Habitat_Analysis.gdb"

# Select suitable vegetation patches from all vegetation
veg = "vegtype"
suitableVeg = "C:/output/Output.gdb/suitable_vegetation"
whereClause = "HABITAT = 1" 
arcpy.Select_analysis(veg, suitableVeg, whereClause)

# Buffer areas of impact around major roads
roads = "majorrds"
roadsBuffer = "C:/output/Output.gdb/buffer_output"
distanceField = "Distance"
sideType = "FULL"
endType = "ROUND"
dissolveType = "LIST"
dissolveField = "Distance"
arcpy.Buffer_analysis(roads, roadsBuffer, distanceField, sideType, endType, 
                      dissolveType, dissolveField)

# Erase areas of impact around major roads from the suitable vegetation patches
eraseOutput = "C:/output/Output.gdb/suitable_vegetation_minus_roads"
xyTol = "1 Meters"
arcpy.Erase_analysis(suitableVeg, roadsBuffer, eraseOutput, xyTol)

                    

Tags

Credits

Use limitations