/// <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); }
/// <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); }