예제 #1
0
        private void getLocating()
        {
            dc.ExecuteCommand(HandleTable.createEventLocating);

            HandleNeighbour handleNeigh = new HandleNeighbour();
            List<mrNeighbour> mrNeighsNew = new List<mrNeighbour>();

            //abis_mrr = dc.Abis_MR.Where(e=>e.cell.Length>2).Where(e => e.bsic5 > 0);

            abis_mrr = dc.Abis_MR;

            foreach (var mr in abis_mrr)
            {
                mrNeighsNew = handleNeigh.getNeighList(handleNeigh.setNeighList(mr), true);
                mrLocating mrlocating = new mrLocating();
                //pencolor = HandleTable.getRandomPenColor(false,false,false);
                SqlGeography tempgeog = new SqlGeography();

                //以时间点做索引比较妥当?
                if (mr.Measurement_Report_time != null)
                    events = mr.Measurement_Report_time.ToString();

                foreach (var n in mrNeighsNew)
                {
                    if (n.nBaIndex == -1 || n.nBSIC == -1)
                    {
                        //服务小区用红色标识吧!
                        // Red: 16711680
                        pen = "Pen (1, 2,16711680)";

                        tempgeog = mrlocating.sLocating(n.ServiceCell, n.rxLev, n.powerControl); //服务小区
                        insertLocatingGeo(events, pen, tempgeog);

                        Console.WriteLine("服务小区:{0}...{1}...{2}", n.ServiceCell, n.rxLev, n.powerControl);

                    }
                    else
                    {

                        greenindex++;
                        if (greenindex > 255) greenindex = 0;
                        pencolor = redindex * 65535 + greenindex * 256 + blueindex;
                        pen = "Pen (1, 2," + pencolor.ToString() + ")";

                        if (n.NeighCell != null)
                        {
                            tempgeog = mrlocating.nLocating(n.NeighCell, n.rxLev, n.powerControl); //邻小区
                            insertLocatingGeo(events, pen, tempgeog);
                            WriteConsole(n.ServiceCell, n.nBaIndex, n.nBCCH, n.nBSIC, n.NeighCell, n.rxLev, n.powerControl);
                        }
                        else
                        {
                            WriteConsole(n.ServiceCell, n.nBaIndex, n.nBCCH, n.nBSIC, "<><><>lost neighbour<><><>", n.rxLev, n.powerControl);
                        }
                       // Console.WriteLine("邻小区:{0}...{1}...{2}", n.NeighCell, n.rxLev, n.powerControl);

                    }
                    //Console.ReadKey();
                }

            }
        }
예제 #2
0
        private void getLocating()
        {
            dc.ExecuteCommand(HandleTable.createEventLocating);

            HandleNeighbour    handleNeigh = new HandleNeighbour();
            List <mrNeighbour> mrNeighsNew = new List <mrNeighbour>();

            //abis_mrr = dc.Abis_MR.Where(e=>e.cell.Length>2).Where(e => e.bsic5 > 0);

            abis_mrr = dc.Abis_MR;

            foreach (var mr in abis_mrr)
            {
                mrNeighsNew = handleNeigh.getNeighList(handleNeigh.setNeighList(mr), true);
                mrLocating mrlocating = new mrLocating();
                //pencolor = HandleTable.getRandomPenColor(false,false,false);
                SqlGeography tempgeog = new SqlGeography();

                //以时间点做索引比较妥当?
                if (mr.Measurement_Report_time != null)
                {
                    events = mr.Measurement_Report_time.ToString();
                }

                foreach (var n in mrNeighsNew)
                {
                    if (n.nBaIndex == -1 || n.nBSIC == -1)
                    {
                        //服务小区用红色标识吧!
                        // Red: 16711680
                        pen = "Pen (1, 2,16711680)";

                        tempgeog = mrlocating.sLocating(n.ServiceCell, n.rxLev, n.powerControl); //服务小区
                        insertLocatingGeo(events, pen, tempgeog);

                        Console.WriteLine("服务小区:{0}...{1}...{2}", n.ServiceCell, n.rxLev, n.powerControl);
                    }
                    else
                    {
                        greenindex++;
                        if (greenindex > 255)
                        {
                            greenindex = 0;
                        }
                        pencolor = redindex * 65535 + greenindex * 256 + blueindex;
                        pen      = "Pen (1, 2," + pencolor.ToString() + ")";

                        if (n.NeighCell != null)
                        {
                            tempgeog = mrlocating.nLocating(n.NeighCell, n.rxLev, n.powerControl); //邻小区
                            insertLocatingGeo(events, pen, tempgeog);
                            WriteConsole(n.ServiceCell, n.nBaIndex, n.nBCCH, n.nBSIC, n.NeighCell, n.rxLev, n.powerControl);
                        }
                        else
                        {
                            WriteConsole(n.ServiceCell, n.nBaIndex, n.nBCCH, n.nBSIC, "<><><>lost neighbour<><><>", n.rxLev, n.powerControl);
                        }
                        // Console.WriteLine("邻小区:{0}...{1}...{2}", n.NeighCell, n.rxLev, n.powerControl);
                    }
                    //Console.ReadKey();
                }
            }
        }