Exemple #1
0
        //-----------------------------------------------------------------------------

        /// <summary>
        /// Open function to produce a single grid file with a given type.
        /// </summary>
        /// <param name="prmInput">Input las file</param>
        /// <param name="prmOutputFileName">Output tor file name</param>
        /// <param name="prmGridType">Grid type</param>
        public void Grid(String prmInput, String prmOutputFileName, TeGriddingType prmGridType)
        {
            // Start of the actual function.
            String blockFile = String.Format(@"{0}\{1}.xml", Path.GetDirectoryName(prmInput), Path.GetFileNameWithoutExtension(prmInput));

            m_Info = TcTileUtils.GetTileBlocks(blockFile);

            String outputFile = String.Format(@"{0}\{1}", m_OutputDirectory, prmOutputFileName);

            Grid(prmInput, new List <TcGridObject>(1)
            {
                new TcGridObject(outputFile, prmGridType, m_Info)
            });
        }
Exemple #2
0
        //-----------------------------------------------------------------------------

        private Int32 GetGridSize(TeGriddingType prmType)
        {
            switch (prmType)
            {
            case TeGriddingType.M1FirstEcho:
                return(1);

            case TeGriddingType.M1LastEcho:
                return(1);

            case TeGriddingType.Levelling:
                return(2);

            case TeGriddingType.Display:
                return(5);

            default:
                return(20);
            }
        }
Exemple #3
0
        //-----------------------------------------------------------------------------

        /// <summary>
        /// Function to return the grid height based on gridding type.
        /// </summary>
        /// <param name="prmPoints">LAS points</param>
        /// <param name="prmType">Gridding type</param>
        /// <returns>The height for that specific grid</returns>
        private Double GetGridHeight(List <TcLasPointBase> prmPoints, TeGriddingType prmType)
        {
            switch (prmType)
            {
            case TeGriddingType.Levelling:
                return(GetLevellingGridHeight(prmPoints));

            case TeGriddingType.M1FirstEcho:
                return(GetM1FirstEchoGridHeight(prmPoints));

            case TeGriddingType.M1LastEcho:
                return(GetM1LastEchoGridHeight(prmPoints));

            case TeGriddingType.Display:
                return(prmPoints.Max(iter => iter.Z));

            default:
                return(prmPoints.Max(iter => iter.Z));
            }
        }
Exemple #4
0
 public TcGridObject(String prmFile, TeGriddingType prmType, TcTileBlockInfoCollection prmInfo)
 {
     Type     = prmType;
     GridSize = GetGridSize(prmType);
     Initialize(prmFile, prmInfo);
 }