شركة التطبيقات المتكاملة لتصميم النظم البرمجية الخاصة ش.ش.و.

Integrated Applications Programming Company

Skip Navigation LinksHome » Code Library » Default

Public general use code classes and xml files that we've compiled and used over the years:

Support class for TentPlay Trek business model

   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Data;
   6:  using System.Collections;
   7:  using System.Xml;
   8:  using System.Xml.Linq;
   9:  using System.Text;
  10:  using System.Text.RegularExpressions;
  11:  using System.IO;
  12:  using System.Threading;
  13:  using Microsoft.EntityFrameworkCore;
  14:  using System.ComponentModel.DataAnnotations;
  15:  using System.Configuration;
  16:  using Ionic.Zip;
  17:   
  18:  namespace Ia.TentPlay.Cl.Model.Business.Trek
  19:  {
  20:      ////////////////////////////////////////////////////////////////////////////
  21:   
  22:      /// <summary publish="true">
  23:      /// Support class for TentPlay Trek business model
  24:      /// </summary>
  25:      /// 
  26:      /// <remarks> 
  27:      /// Copyright © 2012-2015 Jasem Y. Al-Shamlan (info@ia.com.kw), Internet Applications - Kuwait. All Rights Reserved.
  28:      ///
  29:      /// This library is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
  30:      /// the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  31:      ///
  32:      /// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  33:      /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  34:      /// 
  35:      /// You should have received a copy of the GNU General Public License along with this library. If not, see http://www.gnu.org/licenses.
  36:      /// 
  37:      /// Copyright notice: This notice may not be removed or altered from any source distribution.
  38:      /// </remarks> 
  39:      public class Default
  40:      {
  41:          //private const string ngaGnsCountryZipFileFtpLocation = "ftp://ia.com.kw/tentplay.com/data/trek/nga/gns/country-files";
  42:          private const string ngaGnsCountryZipFileFtpLocation = "ftp://iis/tentplay.com/data/trek/nga/gns/country-files";
  43:   
  44:          private const string originalImageFtpLocation = @"ftp://ia.com.kw/tentplay.com/data/trek/country/$applicationCountryIso2/images";
  45:          //private const string originalImageFtpLocation = @"ftp://iis/tentplay.com/data/trek/country/$applicationCountryIso2/images";
  46:   
  47:          private const string destinationImageFtpLocation = @"ftp://ia.com.kw/tentplay.com/data/trek/country/$applicationCountryIso2";
  48:          //private const string destinationImageFtpLocation = @"ftp://iis/tentplay.com/data/trek/country/$applicationCountryIso2";
  49:   
  50:          public const int MaximumNumberTakeOfElementsToDisplayInList = 100;
  51:          public const int MaximumNumberOfTrekToDisplayNearTheCapital = 999;
  52:   
  53:          public const int MaximumNumberOfFeaturesThatWouldAllowForAcceptableAppSizeInAndroidPlayStore = 200000;
  54:   
  55:          ////////////////////////////////////////////////////////////////////////////
  56:   
  57:          /// <summary>
  58:          ///
  59:          /// </summary>
  60:          public Default()
  61:          {
  62:          }
  63:   
  64:          ////////////////////////////////////////////////////////////////////////////
  65:   
  66:          /// <summary>
  67:          ///
  68:          /// </summary>
  69:          public static string FtpUser
  70:          {
  71:              get
  72:              {
  73:                  return ConfigurationManager.AppSettings["ftpUser"].ToString();
  74:              }
  75:          }
  76:   
  77:          ////////////////////////////////////////////////////////////////////////////
  78:   
  79:          /// <summary>
  80:          ///
  81:          /// </summary>
  82:          public static string FtpPassword
  83:          {
  84:              get
  85:              {
  86:                  return ConfigurationManager.AppSettings["ftpPassword"].ToString();
  87:              }
  88:          }
  89:   
  90:          ////////////////////////////////////////////////////////////////////////////
  91:   
  92:          /// <summary>
  93:          ///
  94:          /// </summary>
  95:          public static List<string> SearchSubstringList(string countryIso2, string name)
  96:          {
  97:              string substring;
  98:              string[] nameWordList;
  99:              Hashtable hashtable;
 100:              List<string> substringList;
 101:   
 102:              hashtable = new Hashtable();
 103:              substringList = new List<string>();
 104:   
 105:              nameWordList = Regex.Split(name, @"\W+");
 106:   
 107:              if (countryIso2 == "in" || countryIso2 == "us" || countryIso2 == "mx")
 108:              {
 109:                  //    fullTextSearchName:  f fr fra fran franc franci francis francisc francisco z za zar zarc zarco
 110:   
 111:                  foreach (string nameWord in nameWordList)
 112:                  {
 113:                      hashtable[nameWord] = 1;
 114:   
 115:                      for (int length = 1; length < nameWord.Length; length++)
 116:                      {
 117:                          substring = nameWord.Substring(0, length);
 118:   
 119:                          hashtable[substring] = 1;
 120:                      }
 121:                  }
 122:              }
 123:              else
 124:              {
 125:                  //    fullTextSearchName: a an ana anar anara ar ara e el l m ma man mana manar manara n na nar nara r ra ا ار ارة ال الم المن المنا المنار المنارة ة ر رة ل لم لمن لمنا لمنار لمنارة م من منا منار منارة ن نا نار نارة                 
 126:   
 127:                  foreach (string nameWord in nameWordList)
 128:                  {
 129:                      hashtable[nameWord] = 1;
 130:   
 131:                      for (int length = 1; length < nameWord.Length; length++)
 132:                      {
 133:                          for (int start = 0; start <= nameWord.Length - length; start++)
 134:                          {
 135:                              substring = nameWord.Substring(start, length);
 136:   
 137:                              hashtable[substring] = 1;
 138:                          }
 139:                      }
 140:                  }
 141:              }
 142:   
 143:              substringList = hashtable.Keys.Cast<string>().ToList();
 144:              substringList.Sort();
 145:   
 146:              return substringList;
 147:          }
 148:   
 149:          ////////////////////////////////////////////////////////////////////////////
 150:   
 151:          /// <summary>
 152:          ///
 153:          /// </summary>
 154:          public static void GenerateCSharpCodeToLinqQuery512BinaryToBooleanAndOrStringOfClassFeatures()
 155:          {
 156:              string b, s;
 157:              StringBuilder sb;
 158:   
 159:              sb = new StringBuilder();
 160:   
 161:              sb.AppendLine(@"// code below is generated by code in ca project");
 162:              sb.AppendLine(@"");
 163:   
 164:              for (int i = 0; i < 512; i++)
 165:              {
 166:                  b = Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass.ConvertIntegerToBinary(i);
 167:                  s = Ia.TentPlay.Cl.Model.Business.Trek.FeatureClass.ConvertBinaryToBooleanAndOrStringOfClassFeatures(b);
 168:   
 169:                  sb.AppendLine(@"// integer: " + i + ", binary: " + b.PadLeft(9, '0') + ", string: " + s);
 170:   
 171:                  sb.AppendLine(@"item = (from ncw in featureList where " + s + @" orderby ncw.DistanceToCapital select ncw).ToList().Take(maximumNumberOfTrekToDisplayNearTheCapitalList).LastOrDefault();");
 172:                  sb.AppendLine(@"if (item != null) list.Add(item.DistanceToCapital);");
 173:                  sb.AppendLine(@"else list.Add(0);");
 174:   
 175:                  sb.AppendLine(@"");
 176:              }
 177:   
 178:              sb.AppendLine(@"// end of generated code");
 179:              sb.AppendLine(@"");
 180:   
 181:          }
 182:   
 183:          ////////////////////////////////////////////////////////////////////////////
 184:   
 185:          /// <summary>
 186:          ///
 187:          /// </summary>
 188:          public static string OriginalImageFtpLocation(string applicationCountryIso2)
 189:          {
 190:              return originalImageFtpLocation.Replace("$applicationCountryIso2", applicationCountryIso2);
 191:          }
 192:   
 193:          ////////////////////////////////////////////////////////////////////////////
 194:   
 195:          /// <summary>
 196:          ///
 197:          /// </summary>
 198:          public static string DestinationImageFtpLocation(string applicationCountryIso2)
 199:          {
 200:              return destinationImageFtpLocation.Replace("$applicationCountryIso2", applicationCountryIso2);
 201:          }
 202:   
 203:          ////////////////////////////////////////////////////////////////////////////
 204:   
 205:          /// <summary>
 206:          /// Define the SQLite database file name according to the country file name
 207:          /// </summary>
 208:          public static string SqliteDatabaseFileName(string applicationCountryIso2, string applicationCountryVersion)
 209:          {
 210:              return applicationCountryIso2 + "." + applicationCountryVersion + ".sqlite";
 211:          }
 212:   
 213:          ////////////////////////////////////////////////////////////////////////////
 214:   
 215:          /// <summary>
 216:          /// Define the SQLite database file password according to the country file name
 217:          /// Problem: I cant open an SQLite password protected database file on Android. I will remove the password locks.
 218:          /// </summary>
 219:          [Obsolete]
 220:          public static string _SqliteDatabaseFilePassword(string fileCountry)
 221:          {
 222:              return fileCountry + "000000";
 223:          }
 224:   
 225:          ////////////////////////////////////////////////////////////////////////////
 226:   
 227:          /// <summary>
 228:          /// 
 229:          /// </summary>
 230:          public static string SqliteDatabaseFileCreateFeatureDesignationTableString(bool createVirtualTable, List<Ia.Cl.Model.Language> countrySpokenLanguageList)
 231:          {
 232:              string sql, entryList, languageNameString;
 233:              string[] p;
 234:   
 235:              if (countrySpokenLanguageList.Count > 0)
 236:              {
 237:                  p = (from c in countrySpokenLanguageList select c.Symbol).ToArray();
 238:   
 239:                  if (p.Length == 1)
 240:                  {
 241:                      languageNameString = p[0] + " text";
 242:                  }
 243:                  else
 244:                  {
 245:                      languageNameString = string.Join(" text, ", p);
 246:                      languageNameString += " text";
 247:                  }
 248:              }
 249:              else
 250:              {
 251:                  languageNameString = "en text";
 252:              }
 253:   
 254:              languageNameString = Regex.Replace(languageNameString, @"\bis\b", "[is]");
 255:   
 256:              entryList = "_id text primary key, " + languageNameString + ", class text";
 257:   
 258:              if (createVirtualTable) sql = @"create virtual table featureDesignations using fts3(" + entryList + ")";
 259:              else sql = @"create table featureDesignations (" + entryList + ")";
 260:   
 261:              return sql;
 262:          }
 263:   
 264:          /*
 265:          ////////////////////////////////////////////////////////////////////////////
 266:  
 267:          /// <summary>
 268:          /// 
 269:          /// </summary>
 270:          public static List<string> SqliteDatabaseFileInsertListFeatureDesignationsTableListString
 271:          {
 272:              get
 273:              {
 274:                  int deleted;
 275:                  string sql, description, createdString, updatedString;
 276:                  Ia.Cl.Model.Result result;
 277:                  List<string> sqlList;
 278:                  List<Ia.TentPlay.Cl.Model.Trek.FeatureDesignation> featureDesignationsList;
 279:  
 280:                  sqlList = new List<string>();
 281:  
 282:                  using (var db = new Ia.TentPlay.Db())
 283:                  {
 284:                      featureDesignationsList = Ia.TentPlay.Cl.Model.Data.FeatureDesignation.List(out result);
 285:  
 286:                      if (!result.HasError)
 287:                      {
 288:                          foreach (Ia.TentPlay.Cl.Model.Trek.FeatureDesignation nfdc in featureDesignationsList)
 289:                          {
 290:                              // below: we make sure to change single ''' to "''" in description to store in SQLite
 291:                              description = string.IsNullOrEmpty(nfdc.Description) ? null: nfdc.Description.Replace("'", "''");
 292:  
 293:                              deleted = Convert.ToInt32(nfdc.Deleted);
 294:  
 295:                              createdString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(nfdc.Created);
 296:                              updatedString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(nfdc.Updated);
 297:  
 298:                              // for Andriod, the database tables should use the identifier _id for the primary key of the table. Several Android functions rely on this standard.
 299:                              sql = "insert into featureDesignations (_id, name, arabicName, danishName, description, class, deleted, created, updated) values ('" + nfdc.Id + "', '" + nfdc.En + "', '" + nfdc.Ar + "', '" + nfdc.Da + "', '" + description + "', '" + nfdc.Class + "', " + deleted + ", '" + createdString + "', '" + updatedString + "')";
 300:  
 301:                              sqlList.Add(sql);
 302:                          }
 303:                      }
 304:                  }
 305:  
 306:                  return sqlList;
 307:              }
 308:          }
 309:          */
 310:   
 311:          ////////////////////////////////////////////////////////////////////////////
 312:   
 313:          /// <summary>
 314:          /// 
 315:          /// </summary>
 316:          public static string SqliteDatabaseFileCreateFeaturesTableString(bool createVirtualTable)
 317:          {
 318:              string sql, entryList;
 319:   
 320:              // for Andriod, the database tables should use the identifier _id for the primary key of the table. Several Android functions rely on this standard.
 321:              // note the "Designation_Id" because Designation is an EF entity represented here by text Designation_Id
 322:   
 323:              entryList = "_id text primary key, latitude real, longitude real, distanceToCapital numeric, cMap text, class text, country text, fileCountry text, name text, noDiacriticLowerCaseName text, nativeName text, noDiacriticNativeName text, fullTextSearchName text, designation_Id text, foreign key(designation_Id) references featureDesignations(_id)";
 324:   
 325:              if (createVirtualTable) sql = @"create virtual table featuresFts using fts3(" + entryList + ")";
 326:              else sql = @"create table features (" + entryList + ")";
 327:   
 328:              return sql;
 329:          }
 330:   
 331:          ////////////////////////////////////////////////////////////////////////////
 332:   
 333:          /// <summary>
 334:          /// 
 335:          /// </summary>
 336:          public static List<string> SqliteDatabaseFileInsertListSpecificFeaturesTableListString(string fileCountry)
 337:          {
 338:              int deleted;
 339:              string sql, name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName, fullTextSearchName, createdString, updatedString;
 340:              Ia.Cl.Model.Result result;
 341:              List<string> sqlList, searchSubstringList;
 342:              List<Ia.TentPlay.Cl.Model.Trek.Feature> featuresList;
 343:   
 344:              sqlList = new List<string>();
 345:   
 346:              using (var db = new Ia.TentPlay.Db())
 347:              {
 348:                  featuresList = Ia.TentPlay.Cl.Model.Data.Trek.Feature.List(fileCountry, out result);
 349:   
 350:                  if (!result.HasError)
 351:                  {
 352:                      foreach (Ia.TentPlay.Cl.Model.Trek.Feature ncw in featuresList)
 353:                      {
 354:                          // below: we make sure to change single ''' to "''" in name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName to store in SQLite
 355:                          name = (string.IsNullOrEmpty(ncw.Name)) ? null : ncw.Name.Replace("'", "''");
 356:                          noDiacriticLowerCaseName = (string.IsNullOrEmpty(ncw.NoDiacriticLowerCaseName)) ? null : ncw.NoDiacriticLowerCaseName.Replace("'", "''");
 357:                          nativeName = (string.IsNullOrEmpty(ncw.NativeName)) ? null : ncw.NativeName.Replace("'", "''");
 358:                          noDiacriticNativeName = (string.IsNullOrEmpty(ncw.NoDiacriticNativeName)) ? null : ncw.NoDiacriticNativeName.Replace("'", "''");
 359:   
 360:                          searchSubstringList = Ia.TentPlay.Cl.Model.Business.Trek.Default.SearchSubstringList(fileCountry, noDiacriticLowerCaseName + " " + noDiacriticNativeName);
 361:                          fullTextSearchName = string.Join(" ", searchSubstringList);
 362:   
 363:                          deleted = Convert.ToInt32(ncw.Deleted);
 364:   
 365:                          createdString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(ncw.Created);
 366:                          updatedString = Ia.Cl.Model.Db.Sqlite.DateTimeFormat(ncw.Updated);
 367:   
 368:                          sql = "insert into features (_id, latitude, longitude, distanceToCapital, cMap, class, country, fileCountry, name, noDiacriticLowerCaseName, nativeName, noDiacriticNativeName, fullTextSearchName, designation) values ('" + ncw.Id + "', '" + ncw.Latitude + "', '" + ncw.Longitude + "', '" + ncw.DistanceToCapital + "', '" + ncw.CMap + "', '" + ncw.Class + "', '" + ncw.Class + "', '" + ncw.Country + "', '" + ncw.FileCountry + "', '" + name + "', '" + noDiacriticLowerCaseName + "', '" + nativeName + "', '" + noDiacriticNativeName + "', '" + fullTextSearchName + "', '" + ncw.Designation.Id + "')";
 369:                          //  deleted, created, updated,
 370:   
 371:                          sqlList.Add(sql);
 372:                      }
 373:                  }
 374:              }
 375:   
 376:              return sqlList;
 377:          }
 378:   
 379:          ////////////////////////////////////////////////////////////////////////////
 380:   
 381:          /// <summary>
 382:          ///
 383:          /// </summary>
 384:          public static List<string> AllowedFeatureDesignationList(string countryFeatureFileNameIso2)
 385:          {
 386:              List<string> fullVersion, liteVersion;
 387:   
 388:              liteVersion = LiteVersionAllowedFeatureDesignationList(countryFeatureFileNameIso2);
 389:              fullVersion = FullVersionAllowedFeatureDesignationList(countryFeatureFileNameIso2);
 390:   
 391:              return fullVersion.Union(liteVersion).ToList();
 392:          }
 393:   
 394:          ////////////////////////////////////////////////////////////////////////////
 395:   
 396:          /// <summary>
 397:          ///
 398:          /// </summary>
 399:          public static List<string> LiteVersionAllowedFeatureDesignationList(string countryFeatureFileNameIso2)
 400:          {
 401:              //List<string> allowedList = new List<string> { "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FT", "FURU", "GAP", "GAPU", "GASF", "GLCR", "GLYU", "GOSP", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HOLU", "HSTS", "HTH", "INLT", "INLTQ", "INSM", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "JTY", "KNLU", "KNSU", "LAVA", "LBED", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LOCK", "LTHSE", "MAR", "MDW", "MESA", "MESU", "MFGN", "MFGQ", "MFGSG", "MGV", "MILB", "SBED", "SBKH", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOR", "SHPF", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "STKR", "STM", "STMA", "STMB", "STMC", "STMD", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SWMP", "SYSI", "TAL", "TERR", "TERU", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOWR", "TRB", "TREE", "TRGD", "TRGU", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZOO", "AIRG", "AIRT", "AQC", "FYT", "LNDF", "PSN", "STMGS", "SUBS", "SUBW", "SWT", "TRANT", "PPLF", "PPLCH", "PPLH", "UFHU", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSTY", "MT", "MTS", "MTSU", "MTU", "MVA", "NKM", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "PAL", "PAN", "PANS", "PASS", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "POOL", "POOLI", "PP", "PPLC", "PRK", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDJCT", "RDST", "RDSU", "REG", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RF", "RFC", "RFSU", "RFU", "RFX", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "AGRC", "AGRF", "AIRB", "AIRF", "AIRH", "AIRP", "AIRQ", "AIRS", "AMTH", "ANCH", "ANS", "ARCH", "ARCU", "ASPH", "ASTR", "ASYL", "ATOL", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDR", "BLHL", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BTL", "BTYD", "BUR", "BUSH", "CAPE", "CARN", "CAVE", "CFT", "CHN", "CHNL", "CHNM", "CHNN", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTRA", "CTRR", "CTRS", "CULT", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DIKE", "DLTA", "DPOF", "DPR", "DSRT", "DTCH", "DTCHD", "DTCHI", "DUNE", "DVD", "ERG", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FISH" };
 402:   
 403:              // below: this is a list of all features
 404:              List<string> list = new List<string> { "ADM1", "ADM1H", "ADM2", "ADM2H", "ADM3", "ADM3H", "ADM4", "ADM4H", "ADMD", "ADMDH", "ADMF", "ADMS", "AGRC", "AGRF", "AIRB", "AIRF", "AIRG", "AIRH", "AIRP", "AIRQ", "AIRS", "AIRT", "AMTH", "ANCH", "ANS", "APNU", "AQC", "ARCH", "ARCU", "AREA", "ARRU", "ASPH", "ASTR", "ASYL", "ATHF", "ATOL", "BAN", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDA", "BLDG", "BLDO", "BLDR", "BLHL", "BLOW", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BSTN", "BTL", "BTYD", "BUR", "BUSH", "BUTE", "CAPE", "CAPG", "CARN", "CAVE", "CDAU", "CFT", "CH", "CHN", "CHNL", "CHNM", "CHNN", "CLDA", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNS", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRQ", "CRQS", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTHSE", "CTRA", "CTRB", "CTRCM", "CTRF", "CTRM", "CTRR", "CTRS", "CUET", "CULT", "CUTF", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DEVH", "DIKE", "DIP", "DLTA", "DOMG", "DPOF", "DPR", "DPRG", "DSRT", "DTCH", "DTCHD", "DTCHI", "DTCHM", "DUNE", "DVD", "EDGU", "ERG", "ESCU", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FAN", "FANU", "FCL", "FIRE", "FISH", "FJD", "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FSR", "FT", "FURU", "FY", "FYT", "GAP", "GAPU", "GARG", "GASF", "GATE", "GDN", "GHAT", "GHSE", "GLCR", "GLYU", "GOSP", "GOVL", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HMSD", "HOLU", "HSE", "HSEC", "HSP", "HSPC", "HSPD", "HSPL", "HSTS", "HTH", "HTL", "HUT", "HUTS", "INDS", "INLT", "INLTQ", "INSM", "INTF", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "ITTR", "JTY", "KNLU", "KNSU", "KRST", "LAND", "LAVA", "LBED", "LCTY", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LNDF", "LOCK", "LTER", "LTHSE", "MAR", "MDVU", "MDW", "MESA", "MESU", "MFG", "MFGB", "MFGC", "MFGCU", "MFGLM", "MFGM", "MFGN", "MFGPH", "MFGQ", "MFGSG", "MGV", "MILB", "MKT", "ML", "MLM", "MLO", "MLSG", "MLSGQ", "MLSW", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSQE", "MSSN", "MSSNQ", "MSTY", "MT", "MTS", "MTSU", "MTU", "MUS", "MVA", "NKM", "NOV", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "OVF", "PAL", "PAN", "PANS", "PASS", "PCL", "PCLD", "PCLF", "PCLH", "PCLI", "PCLIX", "PCLS", "PEAT", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "PO", "POOL", "POOLI", "PP", "PPL", "PPLA", "PPLA2", "PPLA3", "PPLA4", "PPLC", "PPLCH", "PPLF", "PPLH", "PPLL", "PPLQ", "PPLR", "PPLS", "PPLW", "PPLX", "PPQ", "PRK", "PRKGT", "PRKHQ", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSN", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCR", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDIN", "RDJCT", "RDST", "RDSU", "RECG", "RECR", "REG", "REP", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RET", "RF", "RFC", "RFSU", "RFU", "RFX", "RGN", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "SBED", "SBKH", "SCH", "SCHA", "SCHC", "SCHM", "SCHN", "SCHT", "SCNU", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOPC", "SHOR", "SHPF", "SHRN", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLID", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SNTR", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "ST", "STBL", "STDM", "STKR", "STLMT", "STM", "STMA", "STMB", "STMC", "STMD", "STMGS", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNB", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SUBS", "SUBW", "SWMP", "SWT", "SYSI", "TAL", "TERR", "TERU", "TMB", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOLL", "TOWR", "TRANT", "TRB", "TREE", "TRGD", "TRGU", "TRIG", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UFHU", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VETF", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZN", "ZNB", "ZNF", "ZOO" };
 405:   
 406:              return list;
 407:          }
 408:   
 409:          ////////////////////////////////////////////////////////////////////////////
 410:   
 411:          /// <summary>
 412:          ///
 413:          /// </summary>
 414:          public static List<string> FullVersionAllowedFeatureDesignationList(string countryFeatureFileNameIso2)
 415:          {
 416:              //List<string> allowedList = new List<string> { "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FT", "FURU", "GAP", "GAPU", "GASF", "GLCR", "GLYU", "GOSP", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HOLU", "HSTS", "HTH", "INLT", "INLTQ", "INSM", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "JTY", "KNLU", "KNSU", "LAVA", "LBED", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LOCK", "LTHSE", "MAR", "MDW", "MESA", "MESU", "MFGN", "MFGQ", "MFGSG", "MGV", "MILB", "SBED", "SBKH", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOR", "SHPF", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "STKR", "STM", "STMA", "STMB", "STMC", "STMD", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SWMP", "SYSI", "TAL", "TERR", "TERU", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOWR", "TRB", "TREE", "TRGD", "TRGU", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZOO", "AIRG", "AIRT", "AQC", "FYT", "LNDF", "PSN", "STMGS", "SUBS", "SUBW", "SWT", "TRANT", "PPLF", "PPLCH", "PPLH", "UFHU", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSTY", "MT", "MTS", "MTSU", "MTU", "MVA", "NKM", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "PAL", "PAN", "PANS", "PASS", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "POOL", "POOLI", "PP", "PPLC", "PRK", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDJCT", "RDST", "RDSU", "REG", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RF", "RFC", "RFSU", "RFU", "RFX", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "AGRC", "AGRF", "AIRB", "AIRF", "AIRH", "AIRP", "AIRQ", "AIRS", "AMTH", "ANCH", "ANS", "ARCH", "ARCU", "ASPH", "ASTR", "ASYL", "ATOL", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDR", "BLHL", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BTL", "BTYD", "BUR", "BUSH", "CAPE", "CARN", "CAVE", "CFT", "CHN", "CHNL", "CHNM", "CHNN", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTRA", "CTRR", "CTRS", "CULT", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DIKE", "DLTA", "DPOF", "DPR", "DSRT", "DTCH", "DTCHD", "DTCHI", "DUNE", "DVD", "ERG", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FISH" };
 417:   
 418:              // below: this is a list of all features
 419:              List<string> list = new List<string> { "ADM1", "ADM1H", "ADM2", "ADM2H", "ADM3", "ADM3H", "ADM4", "ADM4H", "ADMD", "ADMDH", "ADMF", "ADMS", "AGRC", "AGRF", "AIRB", "AIRF", "AIRG", "AIRH", "AIRP", "AIRQ", "AIRS", "AIRT", "AMTH", "ANCH", "ANS", "APNU", "AQC", "ARCH", "ARCU", "AREA", "ARRU", "ASPH", "ASTR", "ASYL", "ATHF", "ATOL", "BAN", "BAR", "BAY", "BAYS", "BCH", "BCHS", "BCN", "BDG", "BDGQ", "BDLD", "BDLU", "BGHT", "BKSU", "BLDA", "BLDG", "BLDO", "BLDR", "BLHL", "BLOW", "BNCH", "BNCU", "BNK", "BNKR", "BNKU", "BNKX", "BOG", "BP", "BRKS", "BRKW", "BSND", "BSNP", "BSNU", "BSTN", "BTL", "BTYD", "BUR", "BUSH", "BUTE", "CAPE", "CAPG", "CARN", "CAVE", "CDAU", "CFT", "CH", "CHN", "CHNL", "CHNM", "CHNN", "CLDA", "CLF", "CLG", "CMN", "CMP", "CMPL", "CMPLA", "CMPMN", "CMPO", "CMPQ", "CMPRF", "CMTY", "CNFL", "CNL", "CNLA", "CNLB", "CNLD", "CNLI", "CNLN", "CNLQ", "CNLSB", "CNLX", "CNS", "CNSU", "CNYN", "CNYU", "COLF", "COMC", "CONE", "COVE", "CRDR", "CRKT", "CRNT", "CRQ", "CRQS", "CRRL", "CRSU", "CRTR", "CSNO", "CST", "CSTL", "CSTM", "CSWY", "CSWYQ", "CTHSE", "CTRA", "CTRB", "CTRCM", "CTRF", "CTRM", "CTRR", "CTRS", "CUET", "CULT", "CUTF", "CVNT", "DAM", "DAMQ", "DAMSB", "DARY", "DCK", "DCKB", "DCKD", "DCKY", "DEPU", "DEVH", "DIKE", "DIP", "DLTA", "DOMG", "DPOF", "DPR", "DPRG", "DSRT", "DTCH", "DTCHD", "DTCHI", "DTCHM", "DUNE", "DVD", "EDGU", "ERG", "ESCU", "EST", "ESTB", "ESTC", "ESTO", "ESTR", "ESTSG", "ESTSL", "ESTT", "ESTX", "ESTY", "FAN", "FANU", "FCL", "FIRE", "FISH", "FJD", "FJDS", "FLD", "FLDI", "FLLS", "FLLSX", "FLTM", "FLTT", "FLTU", "FNDY", "FORD", "FRKU", "FRM", "FRMQ", "FRMS", "FRMT", "FRST", "FRSTF", "FRSU", "FRZU", "FSR", "FT", "FURU", "FY", "FYT", "GAP", "GAPU", "GARG", "GASF", "GATE", "GDN", "GHAT", "GHSE", "GLCR", "GLYU", "GOSP", "GOVL", "GRAZ", "GRGE", "GRSLD", "GRVC", "GRVE", "GRVO", "GRVP", "GRVPN", "GULF", "GVL", "GYSR", "HBR", "HBRX", "HDLD", "HERM", "HLL", "HLLS", "HLLU", "HLSU", "HLT", "HMCK", "HMDA", "HMSD", "HOLU", "HSE", "HSEC", "HSP", "HSPC", "HSPD", "HSPL", "HSTS", "HTH", "HTL", "HUT", "HUTS", "INDS", "INLT", "INLTQ", "INSM", "INTF", "ISL", "ISLF", "ISLM", "ISLS", "ISLT", "ISLX", "ISTH", "ITTR", "JTY", "KNLU", "KNSU", "KRST", "LAND", "LAVA", "LBED", "LCTY", "LDGU", "LDNG", "LEPC", "LEV", "LEVU", "LGN", "LGNS", "LGNX", "LK", "LKC", "LKI", "LKN", "LKNI", "LKO", "LKOI", "LKS", "LKSB", "LKSC", "LKSI", "LKSN", "LKSNI", "LKX", "LNDF", "LOCK", "LTER", "LTHSE", "MAR", "MDVU", "MDW", "MESA", "MESU", "MFG", "MFGB", "MFGC", "MFGCU", "MFGLM", "MFGM", "MFGN", "MFGPH", "MFGQ", "MFGSG", "MGV", "MILB", "MKT", "ML", "MLM", "MLO", "MLSG", "MLSGQ", "MLSW", "MLWND", "MLWTR", "MN", "MNA", "MNAU", "MNC", "MNCR", "MNCU", "MND", "MNDT", "MNDU", "MNFE", "MNMT", "MNN", "MNNI", "MNPB", "MNPL", "MNQ", "MNQR", "MNSN", "MOLE", "MOOR", "MOTU", "MRN", "MRSH", "MRSHN", "MSQE", "MSSN", "MSSNQ", "MSTY", "MT", "MTS", "MTSU", "MTU", "MUS", "MVA", "NKM", "NOV", "NRWS", "NSY", "NTK", "NTKS", "NVB", "OAS", "OBPT", "OBS", "OBSR", "OCH", "OCN", "OILF", "OILJ", "OILP", "OILQ", "OILR", "OILT", "OILW", "OVF", "PAL", "PAN", "PANS", "PASS", "PCL", "PCLD", "PCLF", "PCLH", "PCLI", "PCLIX", "PCLS", "PEAT", "PEN", "PENX", "PGDA", "PIER", "PK", "PKLT", "PKS", "PKSU", "PKU", "PLAT", "PLATX", "PLDR", "PLFU", "PLN", "PLNU", "PLNX", "PLTU", "PMPO", "PMPW", "PND", "PNDI", "PNDN", "PNDNI", "PNDS", "PNDSF", "PNDSI", "PNDSN", "PNLU", "PO", "POOL", "POOLI", "PP", "PPL", "PPLA", "PPLA2", "PPLA3", "PPLA4", "PPLC", "PPLCH", "PPLF", "PPLH", "PPLL", "PPLQ", "PPLR", "PPLS", "PPLW", "PPLX", "PPQ", "PRK", "PRKGT", "PRKHQ", "PRMN", "PRN", "PRNJ", "PRNQ", "PROM", "PRSH", "PRT", "PRVU", "PS", "PSH", "PSN", "PSTB", "PSTC", "PSTP", "PT", "PTGE", "PTS", "PYR", "PYRS", "QCKS", "QUAY", "RAVU", "RCH", "RD", "RDA", "RDB", "RDCR", "RDCUT", "RDGB", "RDGE", "RDGG", "RDGU", "RDIN", "RDJCT", "RDST", "RDSU", "RECG", "RECR", "REG", "REP", "RES", "RESA", "RESF", "RESH", "RESN", "RESP", "RESV", "RESW", "RET", "RF", "RFC", "RFSU", "RFU", "RFX", "RGN", "RGNE", "RGNL", "RHSE", "RISU", "RJCT", "RK", "RKFL", "RKRY", "RKS", "RLG", "RLGR", "RMPU", "RNCH", "RNGA", "RNGU", "RPDS", "RR", "RRQ", "RSD", "RSGNL", "RSRT", "RSTN", "RSTNQ", "RSTP", "RSTPQ", "RSV", "RSVI", "RSVT", "RTE", "RUIN", "RVN", "RYD", "SALT", "SAND", "SBED", "SBKH", "SCH", "SCHA", "SCHC", "SCHM", "SCHN", "SCHT", "SCNU", "SCRB", "SCRP", "SCSU", "SD", "SDL", "SDLU", "SEA", "SHFU", "SHLU", "SHOL", "SHOPC", "SHOR", "SHPF", "SHRN", "SHSE", "SHSU", "SHVU", "SILL", "SILU", "SINK", "SLCE", "SLID", "SLP", "SLPU", "SMSU", "SMU", "SNOW", "SNTR", "SPA", "SPIT", "SPLY", "SPNG", "SPNS", "SPNT", "SPRU", "SPUR", "SQR", "ST", "STBL", "STDM", "STKR", "STLMT", "STM", "STMA", "STMB", "STMC", "STMD", "STMGS", "STMH", "STMI", "STMIX", "STMM", "STMQ", "STMS", "STMSB", "STMX", "STNB", "STNC", "STNE", "STNF", "STNI", "STNM", "STNR", "STNS", "STNW", "STPS", "STRT", "SUBS", "SUBW", "SWMP", "SWT", "SYSI", "TAL", "TERR", "TERU", "TMB", "TMPL", "TMSU", "TMTU", "TNGU", "TNKD", "TNL", "TNLC", "TNLN", "TNLRD", "TNLRR", "TNLS", "TOLL", "TOWR", "TRANT", "TRB", "TREE", "TRGD", "TRGU", "TRIG", "TRL", "TRMO", "TRNU", "TRR", "TUND", "UFHU", "UPLD", "USGE", "VAL", "VALG", "VALS", "VALU", "VALX", "VETF", "VIN", "VINS", "VLC", "VLSU", "WAD", "WADB", "WADJ", "WADM", "WADS", "WADX", "WALL", "WALLA", "WEIR", "WHRF", "WHRL", "WLL", "WLLQ", "WLLS", "WRCK", "WTLD", "WTLDI", "WTRC", "WTRH", "WTRW", "ZN", "ZNB", "ZNF", "ZOO" };
 420:   
 421:              return list;
 422:          }
 423:   
 424:          ////////////////////////////////////////////////////////////////////////////
 425:   
 426:          /// <summary>
 427:          ///
 428:          /// </summary>
 429:          public static void DownloadNgaGnsCountryZipFileAndExtractAndSaveIt(string countryFeatureFips, out string extractedFile)
 430:          {
 431:              string url, temporaryFile;
 432:   
 433:              extractedFile = null;
 434:              temporaryFile = Ia.Cl.Model.Default.AbsoluteTempPath() + DateTime.UtcNow.AddHours(3).Ticks + ".zip";
 435:              url = ngaGnsCountryZipFileFtpLocation + "/" + countryFeatureFips + ".zip";
 436:   
 437:              if (Ia.Cl.Model.Default.DownloadFile(url, temporaryFile))
 438:              {
 439:                  using (ZipFile zf = ZipFile.Read(temporaryFile))
 440:                  {
 441:                      // below: the ZIP file might have multiple files. For our purposes we will look for the file inside the ZIP that has the same name as the *.zip file
 442:   
 443:                      foreach (ZipEntry ze in zf.Entries)
 444:                      {
 445:                          if (ze.FileName.ToLower().Contains(countryFeatureFips))
 446:                          {
 447:                              ze.Extract(Ia.Cl.Model.Default.AbsoluteTempPath(), ExtractExistingFileAction.OverwriteSilently);
 448:   
 449:                              extractedFile = Ia.Cl.Model.Default.AbsoluteTempPath() + ze.FileName;
 450:   
 451:                              break;
 452:                          }
 453:                      }
 454:                  }
 455:   
 456:                  File.Delete(temporaryFile);
 457:              }
 458:              else
 459:              {
 460:   
 461:              }
 462:          }
 463:   
 464:          ////////////////////////////////////////////////////////////////////////////
 465:          ////////////////////////////////////////////////////////////////////////////
 466:      }
 467:   
 468:      ////////////////////////////////////////////////////////////////////////////
 469:      ////////////////////////////////////////////////////////////////////////////
 470:  }