ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / GraphicBuffer Method / GraphicBuffer(IEnumerable<Geometry>,Double,LineJoinType,LineCapType,Double,Double,Int32) Method
The geometries to buffer
The buffer distance in the unit of the geometry's spatial reference
The line join type
The line cap type
The threshold determining when miter joins are replaced with the bevel joins. Use a value of 4 for a good default.
The max deviation of the result buffer from the true buffer in the units of the spatial reference. When maxDeviation is NaN or 0, it is replaced with 1e-5 * abs(distance). When maxDeviation is larger than MIN = 0.5 * abs(distance), it is replaced with MIN. See the remarks section for more information.
The maximum number of vertices in round polygon produced from a buffered point. A value of 96 is used in methods that do not accept maxVerticesInFullCircle. If the value is less than MIN = 12, it is set to MIN. See the remarks section for more information.
Example

In This Topic
    GraphicBuffer(IEnumerable<Geometry>,Double,LineJoinType,LineCapType,Double,Double,Int32) Method
    In This Topic
    Creates a buffer polygon at the specified distance around the input geometry using graphical joins and caps.
    Syntax

    Parameters

    geometries
    The geometries to buffer
    distance
    The buffer distance in the unit of the geometry's spatial reference
    joinType
    The line join type
    capType
    The line cap type
    miterLimit
    The threshold determining when miter joins are replaced with the bevel joins. Use a value of 4 for a good default.
    maxDeviation
    The max deviation of the result buffer from the true buffer in the units of the spatial reference. When maxDeviation is NaN or 0, it is replaced with 1e-5 * abs(distance). When maxDeviation is larger than MIN = 0.5 * abs(distance), it is replaced with MIN. See the remarks section for more information.
    maxVerticesInFullCircle
    The maximum number of vertices in round polygon produced from a buffered point. A value of 96 is used in methods that do not accept maxVerticesInFullCircle. If the value is less than MIN = 12, it is set to MIN. See the remarks section for more information.

    Return Value

    List of geometries representing the graphic buffers
    Exceptions
    ExceptionDescription
    Geometries is null or empty
    The method is not implemented for GeometryBag or Multipatch.
    The buffer distance must be a valid floating point number.
    Remarks
    The spatial reference of the output geometries is the first not null or Unknown spatial reference found in the list of geometries. All other geometries are projected to this spatial reference, if necessary. If no such spatial reference is found, then the Unknown spatial reference is used if it is found in the list. Otherwise, the spatial reference is null.

    The maxDeviation and maxVerticesInFullCircle control the quality of round joins in the buffer. That is, the precision of the buffer is maxDeviation unless the number of required vertices is too large. The maxVerticesInFullCircle controls how many vertices can be in each round join in the buffer. It is approximately equal to the number of vertices in the polygon around a buffered point. It has a priority over maxDeviation. The max deviation is the distance from the result polygon to a true buffer. The real deviation is calculated as the max(maxDeviation, abs(distance) (1 - cos(PI / maxVerticesInFullCircle))).

    Note that maxDeviation can be exceeded because geometry is generalized with 0.25 times the real deviation, also input segments closer than 0.25 real deviation are snapped to a point.

    Note, this operator is equivalent to Buffer(Geometry,Double) when the joins and caps are round.

    See stroke-miterlimit, stroke-linejoin, stroke-linecap parameters in the SVG specification for more info on the graphical parameters.

    Example
    GraphicBuffer Many
    // round join and round caps
    MapPoint point1 = MapPointBuilderEx.CreateMapPoint(0, 0);
    MapPoint point2 = MapPointBuilderEx.CreateMapPoint(1, 1, SpatialReferences.WGS84);
    MapPoint point3 = MapPointBuilderEx.CreateMapPoint(1000000, 1200000, SpatialReferences.WebMercator);
    List<MapPoint> points = new List<MapPoint>() { point1, point2, point3 };
    
    IReadOnlyList<Geometry> geometries = GeometryEngine.Instance.GraphicBuffer(points, 5, LineJoinType.Round, LineCapType.Round, 0, 0, 3000);
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also