Exemple #1
0
        /// <summary>
        /// Creates the highest points.
        /// </summary>
        private void CreateHighestPoints()
        {
            if (tm == null)
            {
                MB.Information("Please Load First An Terrain Model!");
                return;
            }

            DateTime         dtStart       = DateTime.Now;
            List <LatLonAlt> highestpoints = tm.GetHighestPoints(new Envelope(tm.XMin, tm.XMax, tm.YMin, tm.YMax), 10, 20);
            DateTime         dtStop        = DateTime.Now;


            if (highestpoints.Count > 0)
            {
                int iCounter = 0;

                foreach (LatLonAlt lla in highestpoints)
                {
                    var dev = new RFDevice()
                    {
                        Latitude     = lla.Lat,
                        Longitude    = lla.Lon,
                        Altitude     = lla.Alt,
                        Name         = $"HighPoint #{++iCounter } @ {lla.Alt} m",
                        DeviceSource = DeviceSource.Automatic,
                        Id           = iCounter
                    };

                    AddRFDevice(dev, true);
                }
            }

            MB.Information($"Time: {(dtStop - dtStart).ToHHMMSSString()} / Points: {highestpoints.Count}");

            GC.WaitForPendingFinalizers();
            GC.Collect();
        }