ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / SideBuffer Method / SideBuffer(IEnumerable<Polyline>,Double,LeftOrRightSide,LineCapType) Method
The polylines to buffer
The buffer distance
The side of the polyline to create the buffer
The line cap type
Example

In This Topic
    SideBuffer(IEnumerable<Polyline>,Double,LeftOrRightSide,LineCapType) Method
    In This Topic
    Constructs a buffer on one side of a polyline
    Syntax

    Parameters

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

    Return Value

    List of geometries representing the side buffers
    Exceptions
    ExceptionDescription
    Geometries is null or empty
    The buffer distance must be a valid floating point number.
    The method is not implemented for LineCapType.Square.
    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.
    Example
    SideBuffer Many
    SpatialReference spatialReference = SpatialReferenceBuilder.CreateSpatialReference(102010);
    List<Coordinate2D> coordinates = new List<Coordinate2D>()
    {
      new Coordinate2D(1200, 5800),
      new Coordinate2D(1400, 5800),
      new Coordinate2D(1400, 6000),
      new Coordinate2D(1300, 6000),
      new Coordinate2D(1300, 5700)
    };
    
    Polyline polyline1 = PolylineBuilderEx.CreatePolyline(coordinates, spatialReference);
    
    coordinates.Clear();
    coordinates.Add(new Coordinate2D(1400, 6050));
    coordinates.Add(new Coordinate2D(1600, 6150));
    coordinates.Add(new Coordinate2D(1800, 6050));
    
    Polyline polyline2 = PolylineBuilderEx.CreatePolyline(coordinates, spatialReference);
    List<Polyline> polylines = new List<Polyline>() { polyline1, polyline2 };
    IReadOnlyList<Geometry> outGeometries = GeometryEngine.Instance.SideBuffer(polylines, 10, LeftOrRightSide.RightSide, LineCapType.Round);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also