Exemple #1
0
 public Dictionary<short, double> GetPolygonClutterPercent(GeoPolygonRegion polygonRegion, SimulationProgressHandle simProgressHandle, int start, int end, string infoStr)
 {
     double num2;
     double num3;
     double num4;
     double num5;
     this.m_SimulationProgressEvent = (SimulationProgressHandle) Delegate.Combine(this.m_SimulationProgressEvent, simProgressHandle);
     this.m_IsNeedReportProgress = true;
     this.m_ProgressStart = start;
     this.m_ProgressEnd = end;
     this.m_ProgressStr = infoStr;
     List<IGeoRasterData> demData = this.GetDemData(DemDataType.Clutter);
     Dictionary<short, string> allClutter = this.GetAllClutter();
     Dictionary<short, double> dictionary2 = new Dictionary<short, double>();
     this.m_ClutterIDCountDict.Clear();
     foreach (short num in allClutter.Keys)
     {
         this.m_ClutterIDCountDict.Add(num, 0);
         dictionary2.Add(num, 0.0);
     }
     GeoXYRect miniEnclosingRect = polygonRegion.GetMiniEnclosingRect();
     GeoXYRect resPolyRegion = null;
     if ((demData == null) || (demData.Count == 0))
     {
         return dictionary2;
     }
     GetMapBound(demData, out num2, out num3, out num4, out num5);
     GeoXYRect rect = new GeoXYRect(num2, num3, num4, num5);
     try
     {
         resPolyRegion = miniEnclosingRect.GetJoinGeoXYRect(rect);
     }
     catch
     {
         return dictionary2;
     }
     if (null == resPolyRegion)
     {
         return dictionary2;
     }
     if (resPolyRegion.IsRectInGeoXYRect(rect))
     {
         this.m_CaculateFullMap = true;
     }
     else
     {
         this.m_CaculateFullMap = false;
     }
     return this.CalcPolygonClutterPercent(polygonRegion, simProgressHandle, demData, allClutter, resPolyRegion);
 }
Exemple #2
0
 public Dictionary<short, double> GetAllMapClutterPercent(SimulationProgressHandle simProgressHandle, int start, int end, string infoStr)
 {
     if (!this.m_HasAllMapCalc)
     {
         this.m_SimulationProgressEvent = (SimulationProgressHandle) Delegate.Combine(this.m_SimulationProgressEvent, simProgressHandle);
         this.m_IsNeedReportProgress = true;
         this.m_ProgressStart = start;
         this.m_ProgressEnd = end;
         List<IGeoRasterData> demData = this.GetDemData(DemDataType.Clutter);
         Dictionary<short, string> allClutter = this.GetAllClutter();
         Dictionary<short, double> dictionary2 = new Dictionary<short, double>();
         this.m_ClutterIDCountDict.Clear();
         foreach (short num in allClutter.Keys)
         {
             this.m_ClutterIDCountDict.Add(num, 0);
             dictionary2.Add(num, 0.0);
         }
         if ((demData == null) || (demData.Count == 0))
         {
             return dictionary2;
         }
         this.GetAllMapClutterPercent(demData, allClutter);
         this.m_SimulationProgressEvent = (SimulationProgressHandle) Delegate.Remove(this.m_SimulationProgressEvent, simProgressHandle);
         this.m_IsNeedReportProgress = false;
     }
     return new Dictionary<short, double>(this.m_AllMapClutterIDPercentDict);
 }
Exemple #3
0
 public Dictionary<short, int> GetClutterCountDict(GeoPolygonRegion polygonRegion, SimulationProgressHandle simProgressHandle, int start, int end, string infoStr, bool isRandom)
 {
     if (this.GetDemData(DemDataType.Clutter) == null)
     {
         return null;
     }
     if (this.m_IsClutterPercentRun)
     {
         this.m_IsClutterPercentRun = this.m_PolygonRegion.Equals(polygonRegion);
     }
     if (!this.m_IsClutterPercentRun)
     {
         this.m_SimulationProgressEvent = (SimulationProgressHandle) Delegate.Combine(this.m_SimulationProgressEvent, simProgressHandle);
         this.m_IsNeedReportProgress = true;
         this.m_ProgressStart = start;
         this.m_ProgressEnd = end;
         this.m_ProgressStr = infoStr;
         this.GetClutterPercent(polygonRegion, isRandom);
         this.m_SimulationProgressEvent = (SimulationProgressHandle) Delegate.Remove(this.m_SimulationProgressEvent, simProgressHandle);
         this.m_IsNeedReportProgress = false;
     }
     return this.m_ClutterIDCountDict;
 }
Exemple #4
0
 private Dictionary<short, double> CalcPolygonClutterPercent(GeoPolygonRegion polygonRegion, SimulationProgressHandle simProgressHandle, List<IGeoRasterData> rasterDataList, Dictionary<short, string> clutterIDTypeDict, GeoXYRect resPolyRegion)
 {
     if (this.m_CaculateFullMap)
     {
         this.GetAllMapClutterPercent(rasterDataList, clutterIDTypeDict);
         return new Dictionary<short, double>(this.m_AllMapClutterIDPercentDict);
     }
     if (this.m_IsClutterPercentRun)
     {
         this.m_IsClutterPercentRun = polygonRegion.Equals(this.m_PolygonRegion);
     }
     if (!this.m_IsClutterPercentRun)
     {
         this.CalcPolygonClutterPercent(polygonRegion, resPolyRegion, rasterDataList);
         this.m_IsClutterPercentRun = true;
         this.GetPercent(polygonRegion);
         this.m_PolygonRegion = polygonRegion.Clone();
     }
     this.m_SimulationProgressEvent = (SimulationProgressHandle) Delegate.Remove(this.m_SimulationProgressEvent, simProgressHandle);
     this.m_IsNeedReportProgress = false;
     return new Dictionary<short, double>(this.m_ClutterIDPercentDict);
 }