ArcObjects Library Reference  (Geometry)    

IGeometryServer.Buffer Method

Buffers an array of geometries by each distance specified in an array of distances. The distance units can optionally be specified. Geometries buffered at a given distance can optionally be unioned together.

[Visual Basic 6.0]
Function Buffer(
    ByVal pInSR As ISpatialReference, _
    ByVal pBufferSR As ISpatialReference, _
    ByVal pOutSR As ISpatialReference, _
    ByVal pDistances As IDoubleArray, _
    ByVal pUnit As IUnit, _
    ByVal bUnion As Boolean, _
    ByVal pInGeometries As IGeometryArray _
) As IGeometryArray
[Visual Basic .NET]
Public Function Buffer ( _
    ByVal pInSR As ISpatialReference, _
    ByVal pBufferSR As ISpatialReference, _
    ByVal pOutSR As ISpatialReference, _
    ByVal pDistances As IDoubleArray, _
    ByVal pUnit As IUnit, _
    ByVal bUnion As Boolean, _
    ByVal pInGeometries As IGeometryArray _
) As IGeometryArray
[C#]
public IGeometryArray Buffer (
    ISpatialReference pInSR,
    ISpatialReference pBufferSR,
    ISpatialReference pOutSR,
    IDoubleArray pDistances,
    IUnit pUnit,
    bool bUnion,
    IGeometryArray pInGeometries
);
[Java]
public IGeometryArray buffer (
    ISpatialReference pInSR,
    ISpatialReference pbufferSR,
    ISpatialReference pOutSR,
    IDoubleArray pDistances,
    IUnit pUnit,
    Boolean bUnion,
    IGeometryArray pInGeometries
)
throws
    IOException,
    AutomationException
[C++]
HRESULT Buffer(
  ISpatialReference* pInSR,
  ISpatialReference* pBufferSR,
  ISpatialReference* pOutSR,
  IDoubleArray* pDistances,
  IUnit* pUnit,
  VARIANT_BOOL bUnion,
  IGeometryArray* pInGeometries,
  IGeometryArray** ppBufferedGeometries
);
[C++]

Parameters

pInSR

  pInSR is a parameter of type ISpatialReference

pBufferSR

  pBufferSR is a parameter of type ISpatialReference

pOutSR

  pOutSR is a parameter of type ISpatialReference

pDistances

  pDistances is a parameter of type IDoubleArray

pUnit

  pUnit is a parameter of type IUnit

bUnion

  bUnion is a parameter of type VARIANT_BOOL

pInGeometries

  pInGeometries is a parameter of type IGeometryArray

ppBufferedGeometries [out, retval]

  ppBufferedGeometries is a parameter of type IGeometryArray

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Applies the geometric buffer operation to each geometry in pInGeometries, using each distance in the array pDistances. All geometries are assumed to be in the coordinate system pInSR, which cannot be nil.  pBufferSR is the spatial reference in which the geometries are buffered. pOutSR is the spatial reference in which the buffer polygons are returned. pInSR must be specified. Either or both of the other SRs can be nil. If one is not nil, it is used for both buffering and output. The distances can be specified in a separate unit of measure. For example, the buffer distances could be specified in feet and the coordinates of the geometries could be specified in meters.  If bUnion is false, each buffered polygon will be added to ppOutBuffers separately. If bUnion is true, then all geometries buffered at a given distance will be unioned into a single (possibly multipart) polygon and that unioned geometry will be placed in the output array.

 

Refer to IGeometryServer for additional details on how the input spatial reference is interpreted.

When buffering points or multipoints and the input spatial reference is a geographic coordinate system (WGS1984, for example), you have the option of generating true geodesic buffers. To obtain such buffers, specify a linear unit of distance for the pUnit parameter.

Here is an example showing how to create a buffer using the Geometry Server.

See Also

IGeometryServer Interface