Pairwise Buffer (Analysis)

Summary

Creates buffer polygons around input features to a specified distance using a parallel processing approach.

Alternate tools are available for buffer operations. See the Buffer and Graphic Buffer tool documentation for details.

Illustration

Pairwise Buffer tool illustration

Usage

  • All inputs must have a spatial index. Use the Add Spatial Index tool to create an index (particularly for shapefiles) or rebuild an existing index if there is any possibility that it is incorrect.

  • As described in How Buffer works, an important feature of the Buffer tool is the Method parameter, which specifies how buffers will be constructed. The two basic methods for constructing buffers, Euclidean and geodesic, are described as follows:

    • Euclidean buffers measure distance in a two-dimensional Cartesian plane, where distances are calculated between two points on a flat surface. Euclidean buffers are appropriate when analyzing distances around features in a projected coordinate system in a relatively small area (such as one UTM zone).
    • Geodesic buffers account for the shape of the earth (an ellipsoid, or more properly, a geoid). Distances are calculated between two points on a curved surface (the geoid). Geodesic buffers are appropriate in the following circumstances:
      • The input features are dispersed (cover multiple UTM zones, large regions, or the entire globe).
      • The spatial reference (map projection) of the input features distorts distances to preserve other properties such as area.
      Geodesic buffers may appear unusual on a flat map. When displayed on a globe, however, they will look correct. For more information, see How Buffer works.

    The Method parameter specifies how buffers will be created.

    • The Planar option is the default. This option will automatically determine the method to use based on the coordinate system of the input.
      • If the input features have a projected coordinate system, Euclidean buffers will be created.
      • If the input features have a geographic coordinate system and you specify a Buffer Distance value in linear units (meters, feet, and so forth, as opposed to angular units such as degrees), geodesic buffers will be created.
      • This option produces the same result as the Buffer tool prior to ArcGIS 10.3.
    • The Geodesic option creates a shape-preserving geodesic buffer for any input coordinate system. The input features are densified to create buffers that more accurately represent the shape of the input features. In some cases, this option may take more time than a geodesic buffer created using the Planar option. However, the result is a buffer that more accurately matches the shape of the input feature.

    Note:

    You can change the coordinate system of a feature class using the Project tool, or you can set the Output Coordinate System environment before running the Buffer tool, and this coordinate system will be used when creating buffers.

    When using the Planar option, you can improve the accuracy of buffers created with projected inputs using a projection that minimizes distance distortion—such as an Equidistant Conic or an Azimuthal Equidistant projection—that is geographically appropriate for the input.

  • The output feature class will include a BUFF_DIST field that contains the buffer distance used to buffer each feature. When the input is in a projected coordinate system (PCS) and the Method parameter is set to the Planar option, the buffer distance will be in the linear unit of the input's coordinate system. When using the Geodesic option, the buffer distance will always be in meters.

    If a BUFF_DIST field exists in the input, its values will be overwritten in the output. If a Dissolve Type value of All or List is used, the output will not include this field.

  • The output feature class will include a ORIG_FID field that contains the feature ID of the input feature for which the buffer was created. If an ORIG_FID field exists in the input, its values will be overwritten in the output. If a Dissolve Type value of All or List is used, the output will not include this field.

  • When buffering polygon features, negative buffer distances can be used to create buffers inside the polygon features. Using a negative buffer distance will reduce the polygons' boundaries by the distance specified.

    Caution:

    If the negative buffer distance is large enough to collapse the polygon to nothing, a null geometry will be generated. A warning message will appear, and no null geometry features will be written to the output feature class.

  • You can use a field from the input to set the buffer distances. Both numeric and text fields are acceptable. In a text field, the buffer distance can be a number, such as 5, or a valid linear unit, such as 5 kilometers.

    If the buffer field value has a valid linear unit, the buffer will be created using those units.

    If you're using a value without a linear unit and the input is in a PCS, the buffer distance will be in the linear units of the input's spatial reference. If the Method parameter is set to the Geodesic option, the buffer distance will always be in meters.

    If the linear unit is not recognized, the buffer will be in the linear units of the input's spatial reference. To learn more about valid linear units, see Linear units.

    Using a buffer field for buffer distances
  • Buffer operations do not support the transfer of z-values from the input to the output buffer features.

  • Buffer operations do not support the transfer of m-values from the input to the output buffer features.

  • This tool honors the Parallel Processing Factor environment. If the environment is not set (the default) or is set to 100, full parallel processing will be enabled and the tool will attempt to distribute the work to all the logical cores on the machine. If the environment is set to 0, parallel processing will not be enabled. If a factor between 1 and 99 is specified, the tool will identify the percentage of logical cores to use by applying the formula (Parallel Processing Factor / 100 * Logical Cores) rounded up to the nearest integer. If the result of this formula is 0 or 1, parallel processing will not be enabled.

Parameters

LabelExplanationData Type
Input Features

The input point, line, or polygon features that will be buffered.

Feature Layer
Output Feature Class

The feature class containing the output buffers.

Feature Class
Distance [value 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 a field from the input features that contains the distance to buffer each feature.

See the Usage section for more information about how the tool handles linear units.

Linear Unit; Field
Dissolve Type
(Optional)

Specifies the type of dissolve operation that will be performed to remove buffer overlap.

  • No DissolveAn individual buffer for each feature will be maintained, regardless of overlap. This is the default.
  • Dissolve all output features into a single featureAll buffers will be dissolved together into a single feature, removing any overlap.
  • Dissolve features using the listed fields' unique values or combination of valuesAny buffers sharing attribute values in the listed fields (carried over from the input features) will be dissolved.
String
Dissolve Field(s)
(Optional)

The list of fields from the input features on which the output buffers will be dissolved. Any buffers sharing attribute values in the listed fields (carried over from the input features) will be dissolved.

Field
Method
(Optional)

Specifies whether the planar or geodesic method will be used to create the buffers.

  • PlanarIf the input features are in a projected coordinate system, Euclidean buffers will be created. If the input features are in a geographic coordinate system and the buffer distance is in linear units (meters, feet, and so forth, as opposed to angular units such as degrees), geodesic buffers will be created. This is the default. You can use the Output Coordinate System environment setting to specify the coordinate system to use. For example, if the input features are in a projected coordinate system, you can set the environment to a geographic coordinate system to create geodesic buffers.
  • Geodesic (shape preserving)All buffers will be created using a shape-preserving geodesic buffer method, regardless of the input coordinate system.
String
Maximum Offset Deviation
(Optional)

The maximum distance the output buffer boundary will deviate from the true buffer boundary.

While the true boundary of the buffer is a curve, the output boundary will be densified. Use this parameter to control how the output polygon boundary approximates the true buffer boundary.

If this parameter is not set or is set to 0, the tool will identify the maximum deviation. It is recommended that you use the default value. Performance degradation in the tool and in subsequent analyses may result from using a maximum offset deviation that is too small.

Linear Unit

arcpy.analysis.PairwiseBuffer(in_features, out_feature_class, buffer_distance_or_field, {dissolve_option}, {dissolve_field}, {method}, {max_deviation})
NameExplanationData Type
in_features

The input point, line, or polygon features that will be buffered.

Feature Layer
out_feature_class

The feature class containing the output buffers.

Feature Class
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 a field from the input features that contains the distance to buffer each feature.

See the Usage section for more information about how the tool handles linear units.

When specifying a distance, if the linear unit has two words, such as Decimal Degrees, combine the two words into one (for example, 20 DecimalDegrees).

Linear Unit; Field
dissolve_option
(Optional)

Specifies the type of dissolve operation that will be performed to remove buffer overlap.

  • NONEAn individual buffer for each feature will be maintained, regardless of overlap. This is the default.
  • ALLAll buffers will be dissolved together into a single feature, removing any overlap.
  • LISTAny buffers sharing attribute values in the listed fields (carried over from the input features) will be dissolved.
String
dissolve_field
[dissolve_field,...]
(Optional)

The list of fields from the input features on which the output buffers will be dissolved. Any buffers sharing attribute values in the listed fields (carried over from the input features) will be dissolved.

Field
method
(Optional)

Specifies whether the planar or geodesic method will be used to create the buffers.

  • PLANARIf the input features are in a projected coordinate system, Euclidean buffers will be created. If the input features are in a geographic coordinate system and the buffer distance is in linear units (meters, feet, and so forth, as opposed to angular units such as degrees), geodesic buffers will be created. This is the default. You can use the Output Coordinate System environment setting to specify the coordinate system to use. For example, if the input features are in a projected coordinate system, you can set the environment to a geographic coordinate system to create geodesic buffers.
  • GEODESICAll buffers will be created using a shape-preserving geodesic buffer method, regardless of the input coordinate system.
String
max_deviation
(Optional)

The maximum distance the output buffer boundary will deviate from the true buffer boundary.

While the true boundary of the buffer is a curve, the output boundary will be densified. Use this parameter to control how the output polygon boundary approximates the true buffer boundary.

If this parameter is not set or is set to 0, the tool will identify the maximum deviation. It is recommended that you use the default value. Performance degradation in the tool and in subsequent analyses may result from using a maximum offset deviation that is too small.

Linear Unit

Code sample

PairwiseBuffer example 1 (Python window)

The following Python window script demonstrates how to use the PairwiseBuffer function.

import arcpy
arcpy.env.workspace = "C:/data"
arcpy.analysis.PairwiseBuffer("roads", "C:/output/majorrdsBuffered", "100 Feet", 
                              "LIST", "Distance")
PairwiseBuffer example 2 (stand-alone script)

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

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

# Import system modules 
import arcpy

# Set environment settings
arcpy.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.analysis.Select(veg, suitableVeg, whereClause)

# Buffer areas of impact around major roads
roads = "majorrds"
roadsBuffer = "C:/output/Output.gdb/buffer_output"
distanceField = "Distance"
dissolveType = "LIST"
dissolveField = "Distance"
arcpy.analysis.PairwiseBuffer(roads, roadsBuffer, distanceField, 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.analysis.Erase(suitableVeg, roadsBuffer, eraseOutput, xyTol)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics