ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / 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
    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. If the input polyline is empty, then an empty polygon is returned.
    Exceptions
    ExceptionDescription
    Geometry is null.
    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

    ArcGIS Pro version: 3 or higher.
    See Also