Esempio n. 1
0
        /// <summary>
        /// </summary>
        /// <param name="ptsToGuessFor"></param>
        /// <returns></returns>
        public static List <string> GuessAllFilenames(List <Point> ptsToGuessFor)
        {
            var rt = new List <string>();

            foreach (var pt in ptsToGuessFor)
            {
                var fn = Srtm.GuessFilename(pt);
                if (!rt.Contains(fn))
                {
                    rt.Add(fn);
                }
            }

            return(rt);
        }
Esempio n. 2
0
        /// <summary>
        /// </summary>
        /// <param name="pts"></param>
        /// <returns></returns>
        public async Task <List <string> > LoadSrtmsForPoints(List <Point> pts)
        {
            var fnames = GuessAllFilenames(pts);

            LoadedSrtms = new List <Srtm>();
            var resultingNames = new List <string>();

            foreach (var fn in fnames)
            {
                var srtm = await Srtm.FromFileAsync(fn + @".hgt");

                if (srtm == null)
                {
                    continue;
                }

                LoadedSrtms.Add(srtm);

                resultingNames.Add(fn);
            }

            return(resultingNames);
        }