Beispiel #1
0
        private void BaseLineProfillAnalysis_Load(object sender, EventArgs e)
        {
            //zedGraphControl1为ZedGraph控件,获取ZedGraphControl控件的图表显示区域赋值给myPane
            GraphPane myPane = zedGraphControl1.GraphPane;

            myPane.Title.Text            = "剖面分析";      //图表标题
            myPane.Title.FontSpec.Family = "黑体";        //标题字体
            myPane.Title.FontSpec.IsBold = false;       //是否粗体显示
            myPane.Title.FontSpec.Size   = 18.0f;       //字体大小

            myPane.XAxis.Title.Text            = "长度";  //X轴标题
            myPane.XAxis.Title.FontSpec.Family = "黑体";
            myPane.XAxis.Title.FontSpec.IsBold = false;
            myPane.XAxis.Title.FontSpec.Size   = 18.0f;

            myPane.YAxis.Title.Text            = "高程";    //Y轴标题
            myPane.YAxis.Title.FontSpec.Family = "黑体";
            myPane.YAxis.Title.FontSpec.IsBold = false;
            myPane.YAxis.Title.FontSpec.Size   = 18.0f;

            //图表显示区域颜色,渐变颜色1White,渐变颜色2LightGray
            myPane.Chart.Fill = new Fill(Color.White, Color.LightGray, 45.0f);

            //获取线的地表长度  输入:dRadius:半径
            double lineLength = m_geopolyline.GetSphereLength(6378137);


            textBoxPointCount.Text = "100";
            textBoxJianJu.Text     = (lineLength / 99.0).ToString("0.0");
            buttonAnalyse_Click(null, null);
        }
Beispiel #2
0
        private void buttonAnalyse_Click(object sender, EventArgs e)
        {
            if (m_geopolyline != null && m_globe != null)
            {
                checkBoxSameScale.Enabled = true;
                checkBoxXmin.Enabled      = true;
                checkBoxYMin.Enabled      = true;

                GSOPoint3d pntMax, pntMin, pntStart, pntEnd;

                GSOPoint3ds pnt3ds;
                double      dLineLength;

                m_globe.Analysis3D.ProfileAnalyse(m_geopolyline, 100, out pnt3ds, out dLineLength, out pntMax, out pntMin, out pntStart, out pntEnd);

                m_pnt3ds        = pnt3ds;
                m_pntMax        = pntMax;
                m_pntMin        = pntMin;
                m_pntStart      = pntStart;
                m_pntEnd        = pntEnd;
                m_dXTotalLength = dLineLength;
                m_dSphereLength = m_geopolyline.GetSphereLength(6378137.0);
                m_dSpaceLength  = m_geopolyline.GetSpaceLength(false, 6378137.0);
                m_dGroundLength = m_globe.Analysis3D.GetGroundLength(m_geopolyline, false, 0);

                SetLableText();
                DrawCurveGraph();
            }
        }