Example #1
0
        private void tsbOpen_Click(object sender, EventArgs e)
        {

            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                content = new osm();
                OSMFile = openFileDialog1.FileName;
                content.ReadFromFile(OSMFile);
            }
            else return;

            export = new ConvertToSHP(content);
            txtOpen.Clear();
            txtOpen.Text = "File '" + OSMFile + "' opened successfully!" + Environment.NewLine;
            txtOpen.Text += "It contains " + content.nodeCollection.Count.ToString();
            txtOpen.Text += " nodes and " + content.wayCollection.Count.ToString()+" ways.";
            txtOpen.Text += Environment.NewLine + Environment.NewLine;
            //txtOpen.Text += "In terms of shapefiles there are:" + Environment.NewLine;
            //txtOpen.Text += "  -" + areas.ToString() + " polygons" + Environment.NewLine;
            //txtOpen.Text += "  -" + ways.ToString() + " polylines" + Environment.NewLine;
            //txtOpen.Text += "  -" + points.ToString() + " points" + Environment.NewLine;
            
        }
Example #2
0
        private void tsbOpen_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                content = new osm();
                OSMFile = openFileDialog1.FileName;
                content.ReadFromFile(OSMFile);
            }
            else
            {
                return;
            }

            export = new ConvertToSHP(content);
            txtOpen.Clear();
            txtOpen.Text  = "File '" + OSMFile + "' opened successfully!" + Environment.NewLine;
            txtOpen.Text += "It contains " + content.nodeCollection.Count.ToString();
            txtOpen.Text += " nodes and " + content.wayCollection.Count.ToString() + " ways.";
            txtOpen.Text += Environment.NewLine + Environment.NewLine;
            //txtOpen.Text += "In terms of shapefiles there are:" + Environment.NewLine;
            //txtOpen.Text += "  -" + areas.ToString() + " polygons" + Environment.NewLine;
            //txtOpen.Text += "  -" + ways.ToString() + " polylines" + Environment.NewLine;
            //txtOpen.Text += "  -" + points.ToString() + " points" + Environment.NewLine;
        }