private static void UpdateFlatPoints(string[] allFiles)
        {
            long flatpointsloaded = 0;
            long totalpointsflat  = 0;
            var  start            = Stopwatch.StartNew();
            var  lastprogress     = 0;

            foreach (var path in allFiles)
            {
                using (var readerobj = new TcLasReader(path))
                {
                    totalpointsflat += readerobj.TotalPoints;
                }
            }

            Console.WriteLine(" Reading Flat Points {0}", totalpointsflat);
            Console.WriteLine("");

            foreach (var path in allFiles)
            {
                using (var readerobj = new TcLasReader(path))
                {
                    var pts    = readerobj.ReadPoints(readerobj.TotalPoints, readerobj.Header);
                    var length = (object)(FlatPoints.Length);

                    Array.Resize(ref FlatPoints, (FlatPoints.Length + pts.Length));

                    for (int i = 0; i < pts.Length; i++)
                    {
                        var pos = ((int)length + i);
                        var p   = pts[i];

                        FlatPoints[pos] = new TcReportPoint3D(p.X, p.Y, p.Z);
                    }

                    flatpointsloaded += readerobj.TotalPoints;
                }

                var percent = Clamp(
                    (int)Math.Ceiling((double)flatpointsloaded * 100
                                      / totalpointsflat), 0, 100);


                lastprogress = UpdateProgressBar(percent);
            }

            lastprogress = UpdateProgressBar(lastprogress);

            Console.WriteLine("");
            Console.WriteLine("");
            start.Stop();
            Console.WriteLine(" {0} Flat Points Loaded. - Finished {1} secs", flatpointsloaded, Math.Ceiling((double)start.ElapsedMilliseconds / 1000));
        }
        private static void UpdateCoveragePoints(string[] allFiles)
        {
            long pointsloaded = 0;
            long totalpoints  = 0;
            var  start        = Stopwatch.StartNew();
            var  lastprogress = 0;

            foreach (var path in allFiles)
            {
                using (var readerobj = new TcLasReader(path))
                {
                    totalpoints += readerobj.TotalPoints;
                }
            }

            Console.WriteLine(" Reading Coverage Points {0}", totalpoints);
            Console.WriteLine("");

            foreach (var path in allFiles)
            {
                using (var readerobj = new TcLasReader(path))
                {
                    CoveragePoints.AddRange(readerobj.ReadPoints(readerobj.TotalPoints, readerobj.Header));
                    pointsloaded += readerobj.TotalPoints;
                }

                var percent = Clamp(
                    (int)Math.Ceiling((double)pointsloaded * 100
                                      / totalpoints), 0, 100);


                lastprogress = UpdateProgressBar(percent);
            }

            lastprogress = UpdateProgressBar(lastprogress);

            Console.WriteLine("");
            Console.WriteLine("");
            start.Stop();
            Console.WriteLine(" {0} Coverage Points Loaded. - Finished {1} secs", pointsloaded, Math.Ceiling((double)start.ElapsedMilliseconds / 1000));
        }