public static IRing CreateRing(Linestring closedLinestring, IRing ringTemplate) { int pointCount = closedLinestring.SegmentCount + 1; WKSPointZ[] wksPointZs = GetWksPoints(closedLinestring.GetPoints(), pointCount); IRing ring = GeometryFactory.Clone(ringTemplate); ring.SetEmpty(); GeometryUtils.AddWKSPointZs((IPointCollection4)ring, wksPointZs, pointCount); return(ring); }