예제 #1
0
        /// <summary>
        /// True = everything ok
        /// </summary>
        public static bool CheckProblems()
        {
            Reset();
            CheckPath("Forest", CParameterSetter.GetStringSettings(ESettings.forestFileFullName), true);

            //if(!CRxpParser.IsRxp)
            //{
            //	CheckPath("Reftree", CParameterSetter.GetStringSettings(ESettings.reftreeFolderPath), false);
            //}
            CheckPath("Output", CParameterSetter.GetStringSettings(ESettings.outputFolderPath), false);
            if (CParameterSetter.GetBoolSettings(ESettings.useCheckTreeFile))
            {
                CheckPath("Checktree", CParameterSetter.GetStringSettings(ESettings.checkTreeFilePath), true);
            }
            CheckRange();

            CheckExport();

            if (CShpController.exportShape)
            {
                if (CParameterSetter.GetBoolSettings(ESettings.calculateDBH))
                {
                    CheckDBH();
                }
                if (CParameterSetter.GetBoolSettings(ESettings.calculateAGB))
                {
                    CheckAGB();
                }
                CheckTreeRadius();
            }

            bool hasProblems = problems.Count > 0;

            if (hasProblems)
            {
                CDebug.WriteProblems(problems);
                problems.Clear();
            }
            return(!hasProblems);
        }