ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / SideBuffer Method / SideBuffer(Polyline,Double,LeftOrRightSide,LineCapType) Method
The polyline to buffer
The buffer distance
The side of the polyline to create the buffer
The line cap type
Example

In This Topic
    SideBuffer(Polyline,Double,LeftOrRightSide,LineCapType) Method
    In This Topic
    Constructs a buffer on one side of a polyline
    Syntax
    Public Overloads Function SideBuffer( _
       ByVal polyline As Polyline, _
       ByVal distance As Double, _
       ByVal side As LeftOrRightSide, _
       ByVal capType As LineCapType _
    ) As Geometry

    Parameters

    polyline
    The polyline to buffer
    distance
    The buffer distance
    side
    The side of the polyline to create the buffer
    capType
    The line cap type

    Return Value

    Geometry representing the side buffer
    Exceptions
    ExceptionDescription
    Geometry is null or empty
    The buffer distance must be a valid floating point number.
    The method is not implemented for LineCapType.Square.
    Example
    SideBuffer
    // right side, round caps
    SpatialReference sr = SpatialReferenceBuilder.CreateSpatialReference(102010);
    List<Coordinate2D> coords = new List<Coordinate2D>()
    {
      new Coordinate2D(1200, 5800),
      new Coordinate2D(1400, 5800),
      new Coordinate2D(1400, 6000),
      new Coordinate2D(1300, 6000),
      new Coordinate2D(1300, 5700)
    };
    
    Polyline polyline = PolylineBuilderEx.CreatePolyline(coords, sr);
    Polygon output = GeometryEngine.Instance.SideBuffer(polyline, 20, LeftOrRightSide.RightSide, LineCapType.Round) as Polygon;
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also