private void getSectorCoverage() { dc_tmap.ExecuteCommand(HandleTable.createCellTracing); Console.WriteLine(dc_oss.SITE.Count()); foreach (var site in dc_oss.SITE) { if (site.latitude == null) { continue; } CellCoverage cc = new CellCoverage(); #region 这里的算法复杂度高,仿真的过程比较复杂 cc.pre_rxlev = -94; #endregion sgeog = cc.MergePoint(site); sgeom = SqlGeometry.STGeomFromWKB(sgeog.STAsBinary(), 4326).STConvexHull(); pencolor = HandleTable.getRandomPenColor(false, false, false); CellTracing ct = new CellTracing(); ct.cell = site.cell; ct.MI_STYLE = "Pen (1, 60," + pencolor.ToString() + ")"; ct.SP_GEOMETRY = sgeom; sql = @" INSERT INTO [CELLTRACING]([cell],[MI_STYLE],[SP_GEOMETRY]) VALUES ('" + ct.cell + "','" + ct.MI_STYLE + "','" + ct.SP_GEOMETRY + "')"; dc_tmap.ExecuteCommand(sql); } }
private void getSectorCoverage() { dc_tmap.ExecuteCommand(HandleTable.createCellTracing); Console.WriteLine(dc_oss.SITE.Count()); foreach (var site in dc_oss.SITE) { if (site.latitude == null) continue; CellCoverage cc = new CellCoverage(); #region 这里的算法复杂度高,仿真的过程比较复杂 cc.pre_rxlev = -94; #endregion sgeog = cc.MergePoint(site); sgeom = SqlGeometry.STGeomFromWKB(sgeog.STAsBinary(), 4326).STConvexHull(); pencolor = HandleTable.getRandomPenColor(false, false, false); CellTracing ct = new CellTracing(); ct.cell = site.cell; ct.MI_STYLE = "Pen (1, 60," + pencolor.ToString() + ")"; ct.SP_GEOMETRY = sgeom; sql = @" INSERT INTO [CELLTRACING]([cell],[MI_STYLE],[SP_GEOMETRY]) VALUES ('" + ct.cell + "','" + ct.MI_STYLE + "','" + ct.SP_GEOMETRY + "')"; dc_tmap.ExecuteCommand(sql); } }