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); }
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); }