Пример #1
0
        private void btnExecute_Click(object sender, EventArgs e)
        {
            string projectFtrName = cmbProjectBoundary.Text;
            string MapStr         = cmbMap.Text;
            double alpha          = System.Convert.ToDouble(nudAlpha.Value);
            string oPath          = txtOAA.Text;
            string aPath          = txtOutModel.Text;

            if (aPath == null || aPath == "")
            {
                MessageBox.Show("You must select an accuracy assessment  model", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (oPath == null || oPath == "")
            {
                MessageBox.Show("You must select an output model", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (projectFtrName == null || projectFtrName == "")
            {
                MessageBox.Show("You must select a feature Class that represent a boundary", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (MapStr == null || MapStr == "")
            {
                MessageBox.Show("You must select a Map featureClass or Raster", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }


            this.Visible = false;
            IFeatureClass pj = ftrDic[projectFtrName];

            Statistics.dataPrepAdjustAccuracyAssessment aa = null;
            if (ftrDic.ContainsKey(MapStr))
            {
                IFeatureClass mp = ftrDic[MapStr];
                aa = new Statistics.dataPrepAdjustAccuracyAssessment(pj, mp, oPath, aPath);
            }
            else
            {
                IRaster mp = rstDic[MapStr];
                aa = new Statistics.dataPrepAdjustAccuracyAssessment(pj, mp, oPath, aPath);
            }
            aa.buildModel();
            Statistics.ModelHelper mH = new Statistics.ModelHelper(aPath);
            mH.openModelReport(aPath, alpha);
            this.Close();
        }
Пример #2
0
        private void btnVariables_Click(object sender, EventArgs e)
        {
            string mPath = txtOutputPath.Text;

            Statistics.ModelHelper mh = new Statistics.ModelHelper(mPath);
            mh.openModelReport(mPath, 0.05, false);
            Forms.RunningProcess.frmRunningProcessDialog rp = new RunningProcess.frmRunningProcessDialog(false);
            rp.stepPGBar(100);
            rp.Text = "Model Variables";
            rp.enableClose();
            rp.addMessage("Independent variable names:");
            foreach (string s in mh.IndependentVariables)
            {
                rp.addMessage(s);
            }
            rp.Show();
        }
 private void btnVariables_Click(object sender, EventArgs e)
 {
     string mPath = txtOutputPath.Text;
     Statistics.ModelHelper mh = new Statistics.ModelHelper(mPath);
     mh.openModelReport(mPath, 0.05, false);
     Forms.RunningProcess.frmRunningProcessDialog rp = new RunningProcess.frmRunningProcessDialog(false);
     rp.stepPGBar(100);
     rp.Text = "Model Variables";
     rp.enableClose();
     rp.addMessage("Independent variable names:");
     foreach (string s in mh.IndependentVariables)
     {
         rp.addMessage(s);
     }
     rp.Show();
 }
        private void btnExecute_Click(object sender, EventArgs e)
        {
            string projectFtrName = cmbProjectBoundary.Text;
            string MapStr = cmbMap.Text;
            double alpha = System.Convert.ToDouble(nudAlpha.Value);
            string oPath = txtOAA.Text;
            string aPath = txtOutModel.Text;
            if (aPath == null || aPath == "")
            {
                MessageBox.Show("You must select an accuracy assessment  model", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (oPath == null || oPath == "")
            {
                MessageBox.Show("You must select an output model", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (projectFtrName == null || projectFtrName == "")
            {
                MessageBox.Show("You must select a feature Class that represent a boundary", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (MapStr == null || MapStr == "")
            {
                MessageBox.Show("You must select a Map featureClass or Raster", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            this.Visible = false;
            IFeatureClass pj = ftrDic[projectFtrName];
            Statistics.dataPrepAdjustAccuracyAssessment aa = null;
            if (ftrDic.ContainsKey(MapStr))
            {
                IFeatureClass mp = ftrDic[MapStr];
                aa = new Statistics.dataPrepAdjustAccuracyAssessment(pj, mp, oPath, aPath);
            }
            else
            {
                IRaster mp = rstDic[MapStr];
                aa = new Statistics.dataPrepAdjustAccuracyAssessment(pj, mp, oPath, aPath);
            }
            aa.buildModel();
            Statistics.ModelHelper mH = new Statistics.ModelHelper(aPath);
            mH.openModelReport(aPath, alpha);
            this.Close();
        }
        private void btnExecute_Click(object sender, EventArgs e)
        {
            string smpFtrNm = cmbSampleFeatureClass.Text;
            string strataField = cmbStrataField.Text;
            string outP = txtOutputPath.Text;
            if (smpFtrNm == null || smpFtrNm == "")
            {
                MessageBox.Show("You must select a feature Class","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
                return;
            }
            if (strataField == null || strataField == "")
            {
                MessageBox.Show("You must select a strata field or raster", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (outP == null || outP == "")
            {
                MessageBox.Show("You must select an output model path", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            try
            {
                Statistics.ModelHelper.runProgressBar("Running Stratified VarCov");
                List<string> lstInd = new List<string>();
                for (int i = 0; i < lstIndependent.Items.Count; i++)
                {
                    string s = lstIndependent.Items[i].ToString();
                    lstInd.Add(s);
                }

                Statistics.dataPrepStrata strata = null;
                if (ftrDic.ContainsKey(smpFtrNm))
                {
                    if (lstInd.Count < 1)
                    {
                        MessageBox.Show("You must select at least one variable field", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    this.Visible = false;
                    ITable ftrCls = ftrDic[smpFtrNm];
                    strata = new Statistics.dataPrepStrata(ftrCls, lstInd.ToArray(), strataField);
                }
                else
                {
                    IRaster rs = rstDic[smpFtrNm];
                    IRaster rs2 = rstDic[strataField];
                    this.Visible = false;
                    strata = new Statistics.dataPrepStrata(rs, rs2);
                }
                strata.writeModel(outP);
                Statistics.ModelHelper mH = new Statistics.ModelHelper(outP);
                mH.openModelReport(outP, 0.05);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                Statistics.ModelHelper.closeProgressBar();
                this.Close();
            }
        }
Пример #6
0
        private void btnExecute_Click(object sender, EventArgs e)
        {
            string smpFtrNm    = cmbSampleFeatureClass.Text;
            string strataField = cmbStrataField.Text;
            string outP        = txtOutputPath.Text;

            if (smpFtrNm == null || smpFtrNm == "")
            {
                MessageBox.Show("You must select a feature Class", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (strataField == null || strataField == "")
            {
                MessageBox.Show("You must select a strata field or raster", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (outP == null || outP == "")
            {
                MessageBox.Show("You must select an output model path", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            try
            {
                Statistics.ModelHelper.runProgressBar("Running Stratified VarCov");
                List <string> lstInd = new List <string>();
                for (int i = 0; i < lstIndependent.Items.Count; i++)
                {
                    string s = lstIndependent.Items[i].ToString();
                    lstInd.Add(s);
                }

                Statistics.dataPrepStrata strata = null;
                if (ftrDic.ContainsKey(smpFtrNm))
                {
                    if (lstInd.Count < 1)
                    {
                        MessageBox.Show("You must select at least one variable field", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    this.Visible = false;
                    ITable ftrCls = ftrDic[smpFtrNm];
                    strata = new Statistics.dataPrepStrata(ftrCls, lstInd.ToArray(), strataField);
                }
                else
                {
                    IRaster rs  = rstDic[smpFtrNm];
                    IRaster rs2 = rstDic[strataField];
                    this.Visible = false;
                    strata       = new Statistics.dataPrepStrata(rs, rs2);
                }
                strata.writeModel(outP);
                Statistics.ModelHelper mH = new Statistics.ModelHelper(outP);
                mH.openModelReport(outP, 0.05);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            finally
            {
                Statistics.ModelHelper.closeProgressBar();
                this.Close();
            }
        }