コード例 #1
0
        public Result PostFixTerminalLayer()
        {
            try
            {
                GisClient.Result res = GisClient.ServiceApi.getGisLayerService().refreshFixTerminalLayer();
                if (res.Ok)
                {
                    Hashtable ht = new Hashtable();
                    ht["IndexName"] = "固定终端";
                    ht["ShpName"]   = res.ShpName;
                    ht["Type"]      = "fix";
                    ht["DateTime"]  = DateTime.Now;
                    IbatisHelper.ExecuteInsert("insShp", ht);

                    return(new Result(true, "固定终端图层刷新成功"));
                }
                else
                {
                    return(new Result(false, "固定终端图层刷新失败"));
                }
            }
            catch (Exception e)
            {
                return(new Result(false, "远程调用失败" + e));
            }
            finally
            {
                ServiceApi.CloseConn();
            }
        }
コード例 #2
0
        /// <summary>
        /// 更新用于系数校正射线生成及校正的经纬度范围
        /// </summary>
        /// <returns></returns>
        public Result updateCalibrationRange()
        {
            try
            {
                //更新数据库中待生成轨迹所选区域范围,经纬度
                Hashtable paramHt = new Hashtable();
                double    maxLon  = Double.Parse(this.MaxLongitude.ToString());
                double    maxLat  = Double.Parse(this.MaxLatitude.ToString());
                double    minLon  = Double.Parse(this.MinLongitude.ToString());
                double    minLat  = Double.Parse(this.MinLatitude.ToString());
                paramHt["MaxLon"] = maxLon;
                paramHt["MaxLat"] = maxLat;
                paramHt["MinLon"] = minLon;
                paramHt["MinLat"] = minLat;

                Point pMin = new Point(minLon, minLat, 0);
                pMin = PointConvertByProj.Instance.GetProjectPoint(pMin);
                Point pMax = new Point(maxLon, maxLat, 0);
                pMax            = PointConvertByProj.Instance.GetProjectPoint(pMax);
                paramHt["MinX"] = Math.Round(pMin.X, 3);
                paramHt["MinY"] = Math.Round(pMin.Y, 3);
                paramHt["MaxX"] = Math.Round(pMax.X, 3);
                paramHt["MaxY"] = Math.Round(pMax.Y, 3);

                IbatisHelper.ExecuteDelete("DeleteRayAdjRange", null);
                IbatisHelper.ExecuteInsert("insertRayAdjRange", paramHt);

                return(new Result(true, "系数校正区域范围更新成功!"));
            }
            catch (Exception e)
            {
                return(new Result(false, "系数矫正区域范围更新失败!" + e));
            }
        }
コード例 #3
0
        public static Result RefreshCell()
        {
            //LTE.GIS.OperateCellLayer cellLayer = new LTE.GIS.OperateCellLayer();
            //if (!cellLayer.RefreshCellLayer())
            //    return new Result(false, "小区数据为空");
            //return new Result(true);
            try
            {
                GisClient.Result res = GisClient.ServiceApi.getGisLayerService().RefreshCell();
                if (res.Ok)
                {
                    Hashtable ht = new Hashtable();
                    //TODO:最好以地区名最为索引标志,可以通过项目创建时数据库中的地区名称来获得
                    ht["IndexName"] = "南京";
                    ht["ShpName"]   = res.ShpName;
                    ht["Type"]      = "Cell";
                    ht["DateTime"]  = DateTime.Now;
                    IbatisHelper.ExecuteInsert("insShp", ht);

                    return(new Result(true, "小区图层刷新成功"));
                }
                else
                {
                    return(new Result(false, "小区图层刷新失败"));
                }
            }
            catch (Exception e)
            {
                return(new Result(false, "远程调用失败" + e));
            }
            finally
            {
                ServiceApi.CloseConn();
            }
        }
コード例 #4
0
        private void AddToVirsource()
        {
            //判断是否已经有
            //若有,直接返回true
            Hashtable ht1 = new Hashtable();

            ht1["cellname"] = this.virname;
            DataTable isExist = IbatisHelper.ExecuteQueryForDataTable("GetVirSourceAllInfo", ht1);

            if (isExist.Rows.Count == 0 || isExist.Rows[0]["x"] == DBNull.Value)
            {
                Debug.WriteLine("未添加过该目标源");
                Hashtable htbts = new Hashtable();
                htbts["BtsName"] = this.virname;
                DataTable dtcell = IbatisHelper.ExecuteQueryForDataTable("GetSource", htbts);
                if (dtcell != null && dtcell.Rows.Count == 1)
                {
                    Hashtable ht = new Hashtable();
                    ht["CellName"]  = this.virname;
                    ht["Longitude"] = Convert.ToDouble(dtcell.Rows[0]["Longitude"]);
                    ht["Latitude"]  = Convert.ToDouble(dtcell.Rows[0]["Latitude"]);
                    ht["x"]         = Convert.ToDouble(dtcell.Rows[0]["x"]);
                    ht["y"]         = Convert.ToDouble(dtcell.Rows[0]["y"]);
                    ht["z"]         = 0;
                    ht["Altitude"]  = 0;
                    ht["AntHeight"] = Convert.ToDouble(dtcell.Rows[0]["AntHeight"]);

                    // 2017.4.28 添加
                    ht["Tilt"]    = Convert.ToInt32(dtcell.Rows[0]["Tilt"]);
                    ht["EIRP"]    = Convert.ToInt32(dtcell.Rows[0]["EIRP"]);
                    ht["NetType"] = "";
                    ht["CI"]      = Convert.ToInt32(dtcell.Rows[0]["CI"]);
                    ht["EARFCN"]  = Convert.ToInt32(dtcell.Rows[0]["EARFCN"]);
                    ht["eNodeB"]  = Convert.ToInt32(dtcell.Rows[0]["eNodeB"]);
                    IbatisHelper.ExecuteInsert("insertVirSource", ht);
                }
                else
                {
                    Debug.WriteLine("无该版本路测干扰源信息");
                }
            }
            else
            {
                Debug.WriteLine("已添加过该目标源");
            }
        }
コード例 #5
0
        // 刷新小区立体覆盖图层
        public Result refresh3DCover()
        {
            //CellInfo cellInfo = new CellInfo();
            //cellInfo.SourceName = cellName;
            //validateCell(ref cellInfo);

            //if(!AnalysisEntry.Display3DAnalysis(cellInfo))
            //{
            //    return new Result(false, "请先进行小区覆盖计算");
            //}

            //return new Result(true);
            try
            {
                GisClient.Result res = GisClient.ServiceApi.getGisLayerService().refresh3DCover(cellName);
                if (res.Ok)
                {
                    Hashtable ht = new Hashtable();
                    ht["IndexName"] = cellName;
                    ht["ShpName"]   = res.ShpName;
                    ht["Type"]      = "Ground3DCover";
                    ht["DateTime"]  = DateTime.Now;
                    IbatisHelper.ExecuteInsert("insShp", ht);

                    return(new Result(true, "立体覆盖图层刷新成功"));
                }
                else
                {
                    return(new Result(false, "立体覆盖图层刷新失败: " + res.Msg));
                }
            }
            catch (Exception e)
            {
                return(new Result(false, "远程调用失败" + e));
            }
            finally
            {
                ServiceApi.CloseConn();
            }
        }
コード例 #6
0
        public List <CellRayTracingModel> interfeCellGen(DataRange dataRange)
        {
            List <CellRayTracingModel> res = new List <CellRayTracingModel>();
            Point pMin = new Point();

            pMin.X = dataRange.minLongitude;
            pMin.Y = dataRange.minLatitude;
            pMin.Z = 0;
            LTE.Utils.PointConvertByProj.Instance.GetProjectPoint(pMin);

            Point pMax = new Point();

            pMax.X = dataRange.maxLongitude;
            pMax.Y = dataRange.maxLatitude;
            pMax.Z = 0;
            LTE.Utils.PointConvertByProj.Instance.GetProjectPoint(pMax);

            double      maxBh       = 90;   //最大建筑物高度
            int         radius      = 1200; //干扰源覆盖半径
            String      tarBaseName = dataRange.infAreaId + "_";
            List <CELL> cells       = new List <CELL>();
            int         batch       = 10;
            int         cnt         = 0;

            //计算测试数据总数
            int    lx       = (int)Math.Ceiling((pMax.X - pMin.X) / dataRange.tarGridX);
            int    ly       = (int)Math.Ceiling((pMax.Y - pMin.Y) / dataRange.tarGridY);
            int    lz       = (int)Math.Ceiling(maxBh / dataRange.tarGridH);
            long   uidBatch = long.Parse((lx * ly * lz).ToString());
            String dbName   = "CELL";
            int    initOff  = 1500000;
            int    uid      = (int)UIDHelper.GenUIdByRedis(dbName, uidBatch) + initOff;

            for (double x = pMin.X; x < pMax.X; x += dataRange.tarGridX)
            {
                for (double y = pMin.Y; y < pMax.Y; y += dataRange.tarGridY)
                {
                    for (double z = 30; z <= maxBh; z += 30)
                    {
                        cnt++;
                        Random r    = new Random(uid);
                        CELL   cELL = new CELL();
                        cELL.ID             = uid;
                        cELL.CellName       = dataRange.infAreaId + "_" + uid;
                        cELL.Altitude       = 13;
                        cELL.AntHeight      = (decimal)z;
                        cELL.x              = (decimal)x;
                        cELL.y              = (decimal)y;
                        cELL.CI             = uid;
                        cELL.eNodeB         = uid;
                        cELL.EIRP           = 32;
                        cELL.Azimuth        = 0;
                        cELL.Tilt           = r.Next(4, 16); //下倾角范围4~16之间随机取
                        cELL.EARFCN         = 63;
                        cELL.CoverageRadius = radius;
                        cells.Add(cELL);

                        CellRayTracingModel rayCell = new CellRayTracingModel();
                        rayCell.cellName         = cELL.CellName;
                        rayCell.reflectionNum    = 3;
                        rayCell.diffPointsMargin = 5;
                        rayCell.diffractionNum   = 2;
                        rayCell.threadNum        = 3;
                        rayCell.incrementAngle   = 180;
                        rayCell.computeIndoor    = false;
                        rayCell.computeDiffrac   = true;
                        rayCell.distance         = radius;
                        res.Add(rayCell);

                        uid++;
                    }
                    if (res.Count >= batch)
                    {
                        IbatisHelper.ExecuteInsert("CELL_BatchInsert", cells);
                        cells.Clear();
                    }
                }
            }
            if (cells.Count > 0)
            {
                IbatisHelper.ExecuteInsert("CELL_BatchInsert", cells);
            }

            return(res);
        }