Beispiel #1
0
 private Dictionary<GeoRasterStyle, List<short>> GetDict(IGeoDataStructure dataStructure, List<GeoRasterStyle> styles, List<IGeoRasterData> clutterData)
 {
     double resolution = dataStructure.Resolution;
     double x = 0.0;
     double y = 0.0;
     double minValue = double.MinValue;
     short clutterId = 0;
     Dictionary<GeoRasterStyle, List<short>> dictionary = new Dictionary<GeoRasterStyle, List<short>>();
     int num6 = Convert.ToInt32((double) ((dataStructure.RightOfBound - dataStructure.LeftOfBound) / resolution));
     int num7 = Convert.ToInt32((double) ((dataStructure.TopOfBound - dataStructure.BottomOfBound) / resolution));
     for (int i = 0; i < num7; i++)
     {
         for (int j = 0; j < num6; j++)
         {
             minValue = dataStructure.GetValue((i * num6) + j);
             x = (resolution * j) + dataStructure.LeftOfBound;
             y = dataStructure.TopOfBound - (resolution * i);
             clutterId = this.GetValueByPoint(new GeoXYPoint(x, y), clutterData);
             GeoRasterStyle maxMinRange = this.GetMaxMinRange(minValue, styles);
             if (this.IsValidData(clutterId, maxMinRange))
             {
                 if (dictionary.ContainsKey(maxMinRange))
                 {
                     dictionary[maxMinRange].Add(clutterId);
                 }
                 else
                 {
                     dictionary.Add(maxMinRange, new List<short>());
                     dictionary[maxMinRange].Add(clutterId);
                 }
             }
         }
     }
     return dictionary;
 }
Beispiel #2
0
 public Dictionary<GeoRasterStyle, List<double>> GetStudyClutterCoverage(IGeoDataStructure dataStructure, List<GeoRasterStyle> styles)
 {
     List<IGeoRasterData> demData = this.GetDemData(DemDataType.Clutter);
     demData = this.SortRasterDataList(demData);
     if (demData.Count == 0)
     {
         Dictionary<GeoRasterStyle, List<double>> dictionary = new Dictionary<GeoRasterStyle, List<double>>();
         foreach (GeoRasterStyle style in styles)
         {
             dictionary.Add(style, new List<double>());
         }
         return dictionary;
     }
     Dictionary<GeoRasterStyle, List<short>> maxMinClutterIdDict = this.GetDict(dataStructure, styles, demData);
     foreach (GeoRasterStyle style in styles)
     {
         if (!maxMinClutterIdDict.ContainsKey(style))
         {
             maxMinClutterIdDict.Add(style, new List<short>());
         }
     }
     return this.GetStudyClutterCoverage(maxMinClutterIdDict);
 }