ILinearRing GetLinearRing(Ring r) { // Output an approximation for any circular arcs ILength curvetol = new Length(0.1); IPosition[] outline = r.GetOutline(curvetol); DirectPositionCollection dpc = GetDirectPositions(outline); return(m_Factory.CreateLinearRing(dpc)); }
private static ILinearRing FlattenLinearRing(ILinearRing ring, FgfGeometryFactory factory) { //Copy exterior ring double[] flatRingPoints = new double[ring.Count * 2]; int i = 0; foreach (IDirectPosition pos in ring.Positions) { flatRingPoints[i] = pos.X; flatRingPoints[i + 1] = pos.Y; i += 2; } ILinearRing flatRing = factory.CreateLinearRing(FDO_DIM_XY, flatRingPoints.Length, flatRingPoints); return(flatRing); }
private static ILinearRing FlattenLinearRing(ILinearRing ring, FgfGeometryFactory factory) { //Copy exterior ring double[] flatRingPoints = new double[ring.Count * 2]; int i = 0; foreach (IDirectPosition pos in ring.Positions) { flatRingPoints[i] = pos.X; flatRingPoints[i + 1] = pos.Y; i += 2; } ILinearRing flatRing = factory.CreateLinearRing(FDO_DIM_XY, flatRingPoints.Length, flatRingPoints); return flatRing; }