/// <summary> /// Add an offset curve for a ring. /// The side and left and right topological location arguments /// assume that the ring is oriented CW. /// If the ring is in the opposite orientation, /// the left and right locations must be interchanged and the side flipped. /// </summary> /// <param name="coord">The coordinates of the ring (must not contain repeated points).</param> /// <param name="offsetDistance">The distance at which to create the buffer.</param> /// <param name="side">The side of the ring on which to construct the buffer line.</param> /// <param name="cwLeftLoc">The location on the L side of the ring (if it is CW).</param> /// <param name="cwRightLoc">The location on the R side of the ring (if it is CW).</param> private void AddPolygonRing(ICoordinate[] coord, double offsetDistance, Positions side, Locations cwLeftLoc, Locations cwRightLoc) { Locations leftLoc = cwLeftLoc; Locations rightLoc = cwRightLoc; if (CGAlgorithms.IsCCW(coord)) { leftLoc = cwRightLoc; rightLoc = cwLeftLoc; side = Position.Opposite(side); } IList lineList = curveBuilder.GetRingCurve(coord, side, offsetDistance); AddCurves(lineList, leftLoc, rightLoc); }