示例#1
0
 private List<User> GenBlankClutterUser(int VectorUserCount, double VectorArea, GeoPolygonRegion Polygon)
 {
     double clutterUserCount = VectorUserCount;
     List<User> clutterUsers = new List<User>();
     this.ProcessService(clutterUserCount, clutterUsers);
     GeoXYRect Rect = Polygon.GetMiniEnclosingRect();
     clutterUsers.ForEach(delegate (User user) {
         this.SetUserXY(user, Rect, Polygon);
     });
     return clutterUsers;
 }
示例#2
0
 private void GetDatas(GeoPolygonRegion polygonRegion, List<IGeoRasterData> rasterDataList, bool isSetPointDict, bool isRandomPt)
 {
     if ((rasterDataList != null) && (rasterDataList.Count != 0))
     {
         double num;
         double num2;
         double num3;
         double num4;
         GeoXYRect miniEnclosingRect = polygonRegion.GetMiniEnclosingRect();
         GeoXYRect resPolyRegion = null;
         GetMapBound(rasterDataList, out num, out num2, out num3, out num4);
         GeoXYRect rect = new GeoXYRect(num, num2, num3, num4);
         try
         {
             resPolyRegion = miniEnclosingRect.GetJoinGeoXYRect(rect);
         }
         catch
         {
             return;
         }
         if (null != resPolyRegion)
         {
             this.GetDatasCore(polygonRegion, rasterDataList, isSetPointDict, isRandomPt, resPolyRegion);
         }
     }
 }
示例#3
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);
 }
示例#4
0
 public List<GeoXYPoint> GetClutterPointDict(GeoPolygonRegion polygonRegion, short clutterID, List<int> clutterIDIndexList, bool isRandomPt)
 {
     if (this.GetDemData(DemDataType.Clutter) == null)
     {
         return null;
     }
     GeoCalcBound geoCalcBound = new GeoCalcBound(polygonRegion.GetMiniEnclosingRect(), this.GetDemData(0)[0].Resolution);
     return this.GetClutterPointInBound(clutterID, clutterIDIndexList, geoCalcBound, isRandomPt);
 }