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 to a specified distance around the Input Features. An optional dissolve can be performed to remove overlapping buffers.
The Buffer tool is contained in the Analysis Tools tool box.
Learn more about how Buffer works
Software restrictions: none
Illustration:
Usage tips:
- Features will not be buffered if their buffer distance is zero. If you don't want to have a feature buffered in the Output Feature Class, assign it a buffer distance value of zero in the distance field.
- Negative distances can be used when buffering polygon features, to create buffers on the inside of the polygon features. Using a negative value will shrink the output polygon feature by the distance specified.
- The LEFT and RIGHT options generate buffers at the topological left or right of a line. Caution must be exercised in interpreting the left or right side of a polyline. With connecting polylines, the left side of one polyline may be on the right side of another connecting polyline.
- Using the Dissolve Type parameter ALL option will dissolve all buffer polygons into a single multipart polygon feature. Buffers of related features can be dissolved together using the Dissolve Type parameter LIST option and a set of fields for Dissolve Fields. Buffer features with the same values in their Dissolve Fields will be dissolved together.
- Using ALL or LIST for the Dissolve parameter may result in multipart features being created.
- The Side Type and End Type parameters apply only to line features.
- Side Type's LEFT and RIGHT options and End Type's FLAT option are only available with an ArcInfo licence.
- Buffer will expand the XYDomain; of the Output Feature Class to accommodate potential buffer features beyond the Input Feature's XYDomain.
- Using the Dissolve Type parameter's NONE option will add a 'BUFF_DIST' field to the Output Feature Class that will show the buffer distance used for each feature.
- The buffered edges of a LEFT or RIGHT side buffer are different from those created by a FULL buffer due to differences in the algorithms used to create the buffers. When using the LEFT or RIGHT option, a vertex is placed at every degree along the point of rotation, the value is smaller using the FULL option, which creates a smoother line. The difference between the two is within the precision of the Input Features.
- Buffer can create very large multipart polygon features when using the Dissolve option. This is especially true when using a small number of Dissolve Field(s) or when dissolving all polygons into a single polygon. Very large polygon features may cause display problems and/or have poor performance when drawn on a map or when edited. To avoid these potential problems, use Multipart To Singlepart; on Buffer's output to split larger multipart features into many smaller features.
- When using the results of Buffer as input to an overlay operation such as Union; or Intersect; , it is recommended that Buffer output be dissolved in order to reduce the number of features and overlap. This can be done when only a subset of the Input Feature's attributes are necessary for the analysis being performed. This will reduce the number of spatial relationships between the input features being processed, thereby reducing the amount of memory the tool requires and the amount of time required for processing.
- The Dissolve Fields parameter Add Field button is used only in ModelBuilder. In ModelBuilder, where the preceding tool has not been run, or it's derived data does not exist, the Dissolve Fields parameter may not be populated with field names. The Add Field button allows you to add expected fields so you can complete the Buffer dialog and continue to build your model.
- The following environments affect this tool: configKeyword; extent; MDomain; outputCoordinateSystem; outputMFlag; outputZFlag; outputZValue; scratchWorkspace; spatialGrid1; spatialGrid2; spatialGrid3; workspace; XYDomain; , and ZDomain;
|
Constructor Summary |
Buffer()
Creates the Buffer tool with defaults. |
Buffer(java.lang.Object inFeatures,
java.lang.Object outFeatureClass,
java.lang.Object bufferDistanceOrField)
Creates the Buffer tool with the required parameters. |
|
Method Summary |
java.lang.Object |
getBufferDistanceOrField()
Returns the Distance [value or field] parameter of this tool . |
java.lang.Object |
getDissolveField()
Returns the Dissolve Field(s) parameter of this tool . |
java.lang.String |
getDissolveOption()
Returns the Dissolve Type parameter of this tool . |
java.lang.Object |
getInFeatures()
Returns the Input Features parameter of this tool . |
java.lang.String |
getLineEndType()
Returns the End Type parameter of this tool . |
java.lang.String |
getLineSide()
Returns the Side Type parameter of this tool . |
java.lang.Object |
getOutFeatureClass()
Returns the Output Feature Class parameter of this tool . |
java.lang.String |
getToolboxAlias()
Returns the alias of the tool box containing this tool. |
java.lang.String |
getToolboxName()
Returns the name of the tool box containing this tool. |
java.lang.String |
getToolName()
Returns the name of this tool. |
void |
setBufferDistanceOrField(java.lang.Object bufferDistanceOrField)
Sets the Distance [value or field] parameter of this tool . |
void |
setDissolveField(java.lang.Object dissolveField)
Sets the Dissolve Field(s) parameter of this tool . |
void |
setDissolveOption(java.lang.String dissolveOption)
Sets the Dissolve Type parameter of this tool . |
void |
setInFeatures(java.lang.Object inFeatures)
Sets the Input Features parameter of this tool . |
void |
setLineEndType(java.lang.String lineEndType)
Sets the End Type parameter of this tool . |
void |
setLineSide(java.lang.String lineSide)
Sets the Side Type parameter of this tool . |
void |
setOutFeatureClass(java.lang.Object outFeatureClass)
Sets the Output Feature Class parameter of this tool . |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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(java.lang.Object inFeatures,
java.lang.Object outFeatureClass,
java.lang.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 - Feature Layer, the features to be buffered.outFeatureClass - Feature Class, the feature class that will contain the buffer features.bufferDistanceOrField - Linear unit | Field, if the distance units are not specified, or entered as 'Unknown', the units of the Input Features are used (or if the Output Coordinate System environment has been set, its units will be used).
getInFeatures
public java.lang.Object getInFeatures()
- Returns the Input Features parameter of this tool .
This parameter is Feature Layer, the features to be buffered.
This is a required parameter.
- Returns:
- the Input Features
setInFeatures
public void setInFeatures(java.lang.Object inFeatures)
- Sets the Input Features parameter of this tool .
This parameter is Feature Layer, the features to be buffered.
This is a required parameter.
- Parameters:
inFeatures - Feature Layer, the features to be buffered.
getOutFeatureClass
public java.lang.Object getOutFeatureClass()
- Returns the Output Feature Class parameter of this tool .
This parameter is Feature Class, the feature class that will contain the buffer features.
This is a required parameter.
- Returns:
- the Output Feature Class
setOutFeatureClass
public void setOutFeatureClass(java.lang.Object outFeatureClass)
- Sets the Output Feature Class parameter of this tool .
This parameter is Feature Class, the feature class that will contain the buffer features.
This is a required parameter.
- Parameters:
outFeatureClass - Feature Class, the feature class that will contain the buffer features.
getBufferDistanceOrField
public java.lang.Object getBufferDistanceOrField()
- Returns the Distance [value or field] parameter of this tool .
This parameter is Linear unit | Field, if the distance units are not specified, or entered as 'Unknown', the units of the Input Features are used (or if the Output Coordinate System environment has been set, its units will be used).
This is a required parameter.
- Returns:
- the Distance [value or field]
setBufferDistanceOrField
public void setBufferDistanceOrField(java.lang.Object bufferDistanceOrField)
- Sets the Distance [value or field] parameter of this tool .
This parameter is Linear unit | Field, if the distance units are not specified, or entered as 'Unknown', the units of the Input Features are used (or if the Output Coordinate System environment has been set, its units will be used).
This is a required parameter.
- Parameters:
bufferDistanceOrField - Linear unit | Field, if the distance units are not specified, or entered as 'Unknown', the units of the Input Features are used (or if the Output Coordinate System environment has been set, its units will be used).
getLineSide
public java.lang.String getLineSide()
- Returns the Side Type parameter of this tool .
This parameter is String, the LEFT and RIGHT options are not available with an ArcView or ArcEditor license.
This is an optional parameter.
- Returns:
- the Side Type
setLineSide
public void setLineSide(java.lang.String lineSide)
- Sets the Side Type parameter of this tool .
This parameter is String, the LEFT and RIGHT options are not available with an ArcView or ArcEditor license.
This is an optional parameter.
- Parameters:
lineSide - String, the LEFT and RIGHT options are not available with an ArcView or ArcEditor license.-
FULL—A buffer will be generated on both sides of the line. This is the default.
-
LEFT—The topological left of a line will be buffered.
-
RIGHT—The topological right of a line will be buffered.
getLineEndType
public java.lang.String getLineEndType()
- Returns the End Type parameter of this tool .
This parameter is String, for lines, the shape of the buffer at the line end points.
This is an optional parameter.
- Returns:
- the End Type
setLineEndType
public void setLineEndType(java.lang.String lineEndType)
- Sets the End Type parameter of this tool .
This parameter is String, for lines, the shape of the buffer at the line end points.
This is an optional parameter.
- Parameters:
lineEndType - String, for lines, the shape of the buffer at the line end points.-
ROUND—End will be in the shape of a half circle. This is the default.
-
FLAT—Creates rectangular line endings with the middle of the short side of the rectangle coincident with the end point of the line. This option is not available with an ArcView or ArcEditor license.
getDissolveOption
public java.lang.String getDissolveOption()
- Returns the Dissolve Type parameter of this tool .
This parameter is String, specifies whether a dissolve will be performed to remove buffer feature overlap.
This is an optional parameter.
- Returns:
- the Dissolve Type
setDissolveOption
public void setDissolveOption(java.lang.String dissolveOption)
- Sets the Dissolve Type parameter of this tool .
This parameter is String, specifies whether a dissolve will be performed to remove buffer feature overlap.
This is an optional parameter.
- Parameters:
dissolveOption - String, specifies whether a dissolve will be performed to remove buffer feature overlap.-
NONE—Individual buffer for each feature is maintained, regardless of overlap. This is the default.
-
ALL—Dissolves all the buffers together into a single feature and removes any overlap.
-
LIST—Dissolves by a given list of fields.
getDissolveField
public java.lang.Object getDissolveField()
- Returns the Dissolve Field(s) parameter of this tool .
This parameter is Field, the Add Field button, which is used only in ModelBuilder, allows you to add expected field(s) so you can complete the dialog and continue to build your model.
This is an optional parameter.
- Returns:
- the Dissolve Field(s)
setDissolveField
public void setDissolveField(java.lang.Object dissolveField)
- Sets the Dissolve Field(s) parameter of this tool .
This parameter is Field, the Add Field button, which is used only in ModelBuilder, allows you to add expected field(s) so you can complete the dialog and continue to build your model.
This is an optional parameter.
- Parameters:
dissolveField - Field, the Add Field button, which is used only in ModelBuilder, allows you to add expected field(s) so you can complete the dialog and continue to build your model.
getToolName
public java.lang.String getToolName()
- Returns the name of this tool.
- Returns:
- the tool name
getToolboxName
public java.lang.String getToolboxName()
- Returns the name of the tool box containing this tool.
- Returns:
- the tool box name
getToolboxAlias
public java.lang.String getToolboxAlias()
- Returns the alias of the tool box containing this tool.
- Returns:
- the tool box alias