示例#1
0
        public static List <string> GetTiledPreprocessedFilePaths()
        {
            string preprocessedFilePath = GetPreprocessedFilePath();

            SetMainHeader(preprocessedFilePath);

            if (CRxpParser.IsRxp)
            {
                return(new List <string>()
                {
                    preprocessedFilePath
                });
            }

            CDebug.Step(EProgramStep.Pre_LasToTxt);
            //split into tiles and convert to txt
            return(CPreprocessController.GetTxtFilesPaths(preprocessedFilePath));
        }
示例#2
0
        /// <summary>
        /// Get info from preprocessed file using lasinfo and set it to main header
        /// </summary>
        private static void SetMainHeader(string pPreprocessedFilePath)
        {
            //FileInfo fi = new FileInfo(pPreprocessedFilePath);
            string infoFilePath = CPreprocessController.currentTmpFolder + "\\" + CUtils.GetFileName(pPreprocessedFilePath) + "_i.txt";

            string[] headerLines = CPreprocessController.GetHeaderLines(pPreprocessedFilePath, infoFilePath);

            if (headerLines == null)
            {
                CDebug.Error("header lines are null");
                //todo: is it ok to leave it as null??
                //CProjectData.mainHeader = new CHeaderInfo();
            }
            else
            {
                CProjectData.mainHeader = new CHeaderInfo(headerLines);
            }

            //can be inited only after main header is set
            CBitmapExporter.Init();
        }
示例#3
0
        private static string GetPreprocessedFilePath()
        {
            DateTime getPreprocessedFilePathStart = DateTime.Now;
            DateTime start = DateTime.Now;

            CDebug.Progress(1, 3, 1, ref start, getPreprocessedFilePathStart, "classifyFilePath", true);

            string classifyFilePath = CPreprocessController.GetClassifiedFilePath();

            if (CRxpParser.IsRxp)
            {
                return(classifyFilePath);
            }

            /////// lassplit //////////

            CDebug.Step(EProgramStep.Pre_Split);

            CDebug.Progress(2, 3, 1, ref start, getPreprocessedFilePathStart, "splitFilePath", true);

            //split mode = NONE => split file is same as classified file
            string splitFilePath = classifyFilePath;

            switch ((ESplitMode)CParameterSetter.GetIntSettings(ESettings.currentSplitMode))
            {
            case ESplitMode.Manual:
                splitFilePath = CPreprocessController.LasSplit(classifyFilePath);
                break;

            case ESplitMode.Shapefile:
                splitFilePath = CPreprocessController.LasClip(classifyFilePath);
                break;
            }

            return(splitFilePath);
        }