static LineList ConvertedGeoLines(GeoLineList geoLines, CoordinateMap coordinateMap = null)
        {
            LineList lines = new LineList();

            if (coordinateMap == null)
            {
                coordinateMap = MakeCoordinateMap(geoLines);
                DebugLogText(LogLevel.DEBUG, "Created coordinate map: {0}", coordinateMap);
            }

            int lineCount  = 0;
            int pointCount = 0;

            foreach (GeoLine line in geoLines)
            {
                line.SetPrecision(EarthGeo.GeoPrecision);

                /** convert to local coordinate system */
                PointD p1 = coordinateMap.GetPixelPoint(line.P1 as GeoPoint).Round(3) as PointD;
                p1.Name = String.Format("Pt {0}", ++pointCount);

                PointD p2 = coordinateMap.GetPixelPoint(line.P2 as GeoPoint).Round(3) as PointD;
                p2.Name = String.Format("Pt {0}", ++pointCount);

                Line l = new Line(p1, p2);
                l.Name = String.Format("Line {0}", ++lineCount);
                lines.Add(l);

                DebugLogText(LogLevel.DEBUG, "Converted Line {0} {1} to {2}", line, lineCount, l);
            }

            return(lines);
        }
        public GeoSpanningTree(GeoLineList geoLines, CoordinateMap coordinateMap)
        {
            _coordinateMap = coordinateMap;

            m_LinesToConstructor = GeoSpanningTree.ConvertedGeoLines(geoLines, coordinateMap);

            Initialize();
        }
 public GeoSpanningTree(GeoLineList geoLines)
     : this(geoLines, MakeCoordinateMap(geoLines))
 {
 }
        static CoordinateMap MakeCoordinateMap(GeoLineList geoLines)
        {
            GeoRectangle rectangle = geoLines.GetBoundingRectangle();

            return(new CoordinateMap(rectangle.NorthWest, EarthGeo.North, 1000));
        }