com.esri.arcgis.geoprocessing.tools.analysistools
Class Buffer
java.lang.Object
com.esri.arcgis.geoprocessing.AbstractGPTool
com.esri.arcgis.geoprocessing.tools.analysistools.Buffer
- All Implemented Interfaces:
- GPTool
public class Buffer
- extends AbstractGPTool
Creates buffer polygons around input features to a specified distance. An optional dissolve can be performed to combine overlapping buffers.
The Buffer tool is contained in the Analysis Tools tool box.
Usage tips:
- Buffer distances can be provided as either a value representing a linear distance or a field from the input features that contains the linear distance to buffer each feature.
- Geodesic buffering will be performed when the input is a point or multipoint feature class with a geographic coordinate system and the buffer distance is specified in linear units (meters, feet, and so forth). For details, see .
- 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.If the negative buffer distance is large enough to collapse the polygon to nothing, a null geometry will be generated. A warning message will be given, and any null geometry features will not be written to the output feature class.
- Side Type (line_side) options LEFT, RIGHT, and OUTSIDE_ONLY and the End Type (line_end_type) option FLAT are only available with an Advanced license.
- When the output of the Buffer tool will be used as input to an overlay operation such as or , it is recommended that the Dissolve Type option LIST or ALL be used to reduce the number of overlapping features produced by the tool. Use the Dissolve Type option LIST, and in Dissolve Field(s), select only the attributes from the input features that are necessary for the analysis being performed. This will reduce the number of spatial relationships between the datasets involved in the overlay operation, thereby reducing the amount of memory and time required for processing.
- If a field from the input features is used to obtain buffer distances, the field's values can be either a number (5, for example) or a number with a valid linear unit (5 Kilometers, for example). If the field values are simply a number, it is implied that these distances are in the linear unit of the input features' spatial reference. Field values can also be entered with any valid linear unit and the feature will be buffered to that specified distance. For example, a field with values 500 Feet, 200 Meters, 1 Kilometers, and 2 Miles could be specified, and each of the output buffers would be the appropriate size. If the linear unit specified in the field values is invalid or not recognized, the linear unit of the input features' spatial reference will be used by default.
- The Buffer tool can create very large multipart polygon features when the Dissolve Type option is set to ALL or LIST. This is especially true when using a dissolve field that has few unique values or when dissolving all polygons into a single polygon. Very large polygon features can cause display problems and poor performance when the features are drawn on a map or edited. To avoid these potential problems, use on the Buffer tool's output to split larger multipart features into many smaller features.
- For details on how the dissolve types ALL and LIST work, please refer to the documentation for the tool.
- Using the Dissolve Type option NONE adds the field BUFF_DIST to the output feature class. This field contains the buffer distance used to buffer each feature.
- The Dissolve Field(s) parameter Add Field button is used only in ModelBuilder. In ModelBuilder, where the preceding tool has not been run or its derived data does not exist, the Dissolve Field(s) parameter may not be populated with field names. The Add Field button allows expected fields to be added to the Dissolve Field(s) list in order to complete the Buffer tool dialog box.
- Features are excluded from the buffer process if their buffer distance is zero.
- The buffered edges of a left or right side buffer are slightly different from those created by a full buffer due to differences in the algorithms used to create the buffers. The difference between the two is within the precision of the input features.
Constructor Summary |
Buffer()
Creates the Buffer tool with defaults. |
Buffer(Object inFeatures,
Object outFeatureClass,
Object bufferDistanceOrField)
Creates the Buffer tool with the required parameters. |
Buffer
public Buffer()
- Creates the Buffer tool with defaults.
Initializes the array of tool parameters with the default values specified when the tool was created.
Buffer
public Buffer(Object inFeatures,
Object outFeatureClass,
Object bufferDistanceOrField)
- Creates the Buffer tool with the required parameters.
Initializes the array of tool parameters with the values as specified for the required parameters and with the default values for the other parameters.
- Parameters:
inFeatures
- the input point, line, or polygon features to be buffered.outFeatureClass
- the feature class containing the output feature buffers.bufferDistanceOrField
- the distance around the input features in which buffer zones are created. Distances can be provided as either a value representing a linear distance or as a numeric field from the input features that contains the linear distances to buffer each feature. if the Distance linear units are not specified or are entered as Unknown, the linear unit of the input features' spatial reference is used.
getInFeatures
public Object getInFeatures()
- Returns the Input Features parameter of this tool .
This parameter is the input point, line, or polygon features to be buffered.
This is a required parameter.
- Returns:
- the Input Features
setInFeatures
public void setInFeatures(Object inFeatures)
- Sets the Input Features parameter of this tool .
This parameter is the input point, line, or polygon features to be buffered.
This is a required parameter.
- Parameters:
inFeatures
- the input point, line, or polygon features to be buffered.
getOutFeatureClass
public Object getOutFeatureClass()
- Returns the Output Feature Class parameter of this tool .
This parameter is the feature class containing the output feature buffers.
This is a required parameter.
- Returns:
- the Output Feature Class
setOutFeatureClass
public void setOutFeatureClass(Object outFeatureClass)
- Sets the Output Feature Class parameter of this tool .
This parameter is the feature class containing the output feature buffers.
This is a required parameter.
- Parameters:
outFeatureClass
- the feature class containing the output feature buffers.
getBufferDistanceOrField
public Object getBufferDistanceOrField()
- Returns the Distance [value or field] parameter of this tool .
This parameter is the distance around the input features in which buffer zones are created. Distances can be provided as either a value representing a linear distance or as a numeric field from the input features that contains the linear distances to buffer each feature. if the Distance linear units are not specified or are entered as Unknown, the linear unit of the input features' spatial reference is used.
This is a required parameter.
- Returns:
- the Distance [value or field]
setBufferDistanceOrField
public void setBufferDistanceOrField(Object bufferDistanceOrField)
- Sets the Distance [value or field] parameter of this tool .
This parameter is the distance around the input features in which buffer zones are created. Distances can be provided as either a value representing a linear distance or as a numeric field from the input features that contains the linear distances to buffer each feature. if the Distance linear units are not specified or are entered as Unknown, the linear unit of the input features' spatial reference is used.
This is a required parameter.
- Parameters:
bufferDistanceOrField
- the distance around the input features in which buffer zones are created. Distances can be provided as either a value representing a linear distance or as a numeric field from the input features that contains the linear distances to buffer each feature. if the Distance linear units are not specified or are entered as Unknown, the linear unit of the input features' spatial reference is used.
getLineSide
public String getLineSide()
- Returns the Side Type parameter of this tool .
This parameter is the side(s) of the input features that will be buffered. this optional parameter is not available with a Basic or Standard license.
This is an optional parameter.
- Returns:
- the Side Type
setLineSide
public void setLineSide(String lineSide)
- Sets the Side Type parameter of this tool .
This parameter is the side(s) of the input features that will be buffered. this optional parameter is not available with a Basic or Standard license.
This is an optional parameter.
- Parameters:
lineSide
- the side(s) of the input features that will be buffered. this optional parameter is not available with a Basic or Standard license.
getLineEndType
public String getLineEndType()
- Returns the End Type parameter of this tool .
This parameter is the shape of the buffer at the end of line input features. This parameter is not valid for polygon input features. this optional parameter is not available with a Basic or Standard license.
This is an optional parameter.
- Returns:
- the End Type
setLineEndType
public void setLineEndType(String lineEndType)
- Sets the End Type parameter of this tool .
This parameter is the shape of the buffer at the end of line input features. This parameter is not valid for polygon input features. this optional parameter is not available with a Basic or Standard license.
This is an optional parameter.
- Parameters:
lineEndType
- the shape of the buffer at the end of line input features. This parameter is not valid for polygon input features. this optional parameter is not available with a Basic or Standard license.
getDissolveOption
public String getDissolveOption()
- Returns the Dissolve Type parameter of this tool .
This parameter is specifies the dissolve to be performed to remove output buffer overlap.
This is an optional parameter.
- Returns:
- the Dissolve Type
setDissolveOption
public void setDissolveOption(String dissolveOption)
- Sets the Dissolve Type parameter of this tool .
This parameter is specifies the dissolve to be performed to remove output buffer overlap.
This is an optional parameter.
- Parameters:
dissolveOption
- specifies the dissolve to be performed to remove output buffer overlap.
getDissolveField
public Object getDissolveField()
- Returns the Dissolve Field(s) parameter of this tool .
This parameter is the list of field(s) from the input features on which to dissolve the output buffers. Any buffers sharing attribute values in the listed fields (carried over from the input features) are dissolved.
This is an optional parameter.
- Returns:
- the Dissolve Field(s)
setDissolveField
public void setDissolveField(Object dissolveField)
- Sets the Dissolve Field(s) parameter of this tool .
This parameter is the list of field(s) from the input features on which to dissolve the output buffers. Any buffers sharing attribute values in the listed fields (carried over from the input features) are dissolved.
This is an optional parameter.
- Parameters:
dissolveField
- the list of field(s) from the input features on which to dissolve the output buffers. Any buffers sharing attribute values in the listed fields (carried over from the input features) are dissolved.
getToolName
public String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias