예제 #1
0
        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));
        }
예제 #2
0
        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);
        }
예제 #3
0
        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;
        }