private void m_RenderWKTButton_Click(object sender, EventArgs e)
        {
            Topology.IO.WKTReader rd = new Topology.IO.WKTReader();
            IEnvelope bounds = rd.Read(BoundWKT.Text).EnvelopeInternal;

            LittleSharpRenderEngine.IProvider provider = new WKTProvider(WKTFile.Text);

			//show map
            frmMap dlg = new frmMap(bounds, null, provider);
            dlg.ShowDialog();
        }
        public WKTProvider(string filename)
        {
            m_geometries = new List<IGeometry>();
            SetDefaultStyles();

            Topology.IO.WKTReader rd = new Topology.IO.WKTReader();
            foreach (string x in System.IO.File.ReadAllLines(filename))
                if (x.Trim().Length > 0)
                    m_geometries.Add(rd.Read(x));

            m_name = System.IO.Path.GetFileNameWithoutExtension(filename);
        }
Exemplo n.º 3
0
        private void m_RenderWKTButton_Click(object sender, EventArgs e)
        {
            Topology.IO.WKTReader rd     = new Topology.IO.WKTReader();
            IEnvelope             bounds = rd.Read(BoundWKT.Text).EnvelopeInternal;

            LittleSharpRenderEngine.IProvider provider = new WKTProvider(WKTFile.Text);

            //show map
            frmMap dlg = new frmMap(bounds, null, provider);

            dlg.ShowDialog();
        }
Exemplo n.º 4
0
        public WKTProvider(string filename)
        {
            m_geometries = new List <IGeometry>();
            SetDefaultStyles();

            Topology.IO.WKTReader rd = new Topology.IO.WKTReader();
            foreach (string x in System.IO.File.ReadAllLines(filename))
            {
                if (x.Trim().Length > 0)
                {
                    m_geometries.Add(rd.Read(x));
                }
            }

            m_name = System.IO.Path.GetFileNameWithoutExtension(filename);
        }