Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            double    x         = Convert.ToDouble(textBox1.Text);
            double    y         = Convert.ToDouble(textBox2.Text);
            GISVertex onevertex = new GISVertex(x, y);
            GISPoint  onepoint  = new GISPoint(onevertex);


            //获取属性信息
            string       attribute    = textBox3.Text;
            GISAttribute oneattribute = new GISAttribute();

            oneattribute.AddValue(attribute);

            //新建一个GISFeature 并添加到features数组中
            GISFeature onefeature = new GISFeature(onepoint, oneattribute);

            features.Add(onefeature);

            //画出这个GISFeature
            Graphics graphics = this.CreateGraphics();

            onefeature.draw(graphics, true, 0);
            //参数分别是画笔 是否绘制属性 属性列表values的索引
        }
Beispiel #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            //获取属性信息
            string       attribute    = textBox3.Text;
            GISAttribute oneattribute = new GISAttribute();

            oneattribute.AddValue(attribute);

            GISLine  oneline  = new GISLine(linevertexes); //创建line作为空间对象找到endnode作为属性绘制的位置
            Graphics graphics = this.CreateGraphics();

            oneattribute.draw(graphics, oneline.endNode(), 0);
        }
Beispiel #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            //获取属性信息
            string       attribute    = textBox3.Text;
            GISAttribute oneattribute = new GISAttribute();

            oneattribute.AddValue(attribute);

            GISPolygon onepoly  = new GISPolygon(polyvertexes);
            Graphics   graphics = this.CreateGraphics();

            oneattribute.draw(graphics, onepoly.endNode(), 0);
        }
Beispiel #4
0
        public GISAttribute attributepart;                            //空间与属性信息

        public GISFeature(GISSpatial spatial, GISAttribute attribute) //构造函数传入空间与属性信息
        {
            spatialpart   = spatial;
            attributepart = attribute;
        }