Ejemplo n.º 1
0
        public OperateDTLayer(string layerName)
        {
            IFeatureWorkspace featureWorkspace = MapWorkSpace.getWorkSpace();
            string            path             = System.Configuration.ConfigurationSettings.AppSettings["GisPath"].ToString();

            //若不存在shp文件,则创建
            if (!DefineLayer.findLayer(path, layerName))
            {
                new CreateLayer(path, layerName).CreateDTLayer();//目前有问题,但是理论上不需要新建
            }
            pFeatureClass = featureWorkspace.OpenFeatureClass(layerName);
            pFeatureLayer = new FeatureLayer();
            pFeatureLayer.FeatureClass = pFeatureClass;


            this.IdIndex     = pFeatureClass.FindField("Id");
            this.RSRPIndex   = pFeatureClass.FindField("RSRP");
            this.SINRIndex   = pFeatureClass.FindField("SINR");
            this.xIndex      = pFeatureClass.FindField("x");
            this.yIndex      = pFeatureClass.FindField("y");
            this.DeviceIndex = pFeatureClass.FindField("Device");
            //this.BtsnameIndex = pFeatureClass.FindField("Btsname");
            //this.eNodeBIndex = pFeatureClass.FindField("eNodeBID");
            //this.PCIIndex = pFeatureClass.FindField("PCI");
        }
Ejemplo n.º 2
0
        // 列名
        public OperateTINLayer(string layerName)
        {
            //IFeatureWorkspace featureWorkspace = MapWorkSpace.getWorkSpace();
            //IFeatureClass fclass = featureWorkspace.OpenFeatureClass(layerName);
            //IFeatureLayer flayer = new FeatureLayer();
            //pFeatureLayer.FeatureClass = pFeatureClass;

            IFeatureWorkspace featureWorkspace = MapWorkSpace.getWorkSpace();
            string            path             = System.Configuration.ConfigurationSettings.AppSettings["GisPath"].ToString();

            //若不存在shp文件,则创建
            if (!DefineLayer.findLayer(path, layerName))
            {
                new CreateLayer(path, layerName).CreateTinLayer();
            }
            pFeatureClass = featureWorkspace.OpenFeatureClass(layerName);
            pFeatureLayer = new FeatureLayer();
            pFeatureLayer.FeatureClass = pFeatureClass;
            this.point1Index           = pFeatureClass.FindField("point1");
            this.point2Index           = pFeatureClass.FindField("point2");
            this.point3Index           = pFeatureClass.FindField("point3");

            //pFeatureLayer = GISMapApplication.Instance.GetLayer(LayerNames.TIN) as IFeatureLayer;
            //pFeatureClass = pFeatureLayer.FeatureClass;
        }
        // 列名
        public OperateCoverGirdLayer(string layerName)
        {
            IFeatureWorkspace featureWorkspace = MapWorkSpace.getWorkSpace();

            string path = System.Configuration.ConfigurationSettings.AppSettings["GisPath"].ToString();

            //若不存在shp文件,则创建
            if (!DefineLayer.findLayer(path, layerName))
            {
                //new CreateLayer(path, layerName).Test();
                new CreateLayer(path, layerName).CreateCoverLayer();
            }

            pFeatureClass = featureWorkspace.OpenFeatureClass(layerName);

            pFeatureLayer = new FeatureLayer();
            pFeatureLayer.FeatureClass = pFeatureClass;
            //int n = pFeatureClass.FeatureCount(new QueryFilterClass());

            //pFeatureLayer = GISMapApplication.Instance.GetLayer(LayerNames.CoverGrids) as IFeatureLayer;
            //pFeatureClass = pFeatureLayer.FeatureClass;
            this.RecePowerIndex = pFeatureClass.FindField("RecePower");
            this.PathLossIndex  = pFeatureClass.FindField("PathLoss");
            this.GXIDIndex      = pFeatureClass.FindField("GXID");
            this.GYIDIndex      = pFeatureClass.FindField("GYID");
            this.cellNameIndex  = pFeatureClass.FindField("CellName");
            this.eNodeBIndex    = pFeatureClass.FindField("eNodeB");
            this.CIIndex        = pFeatureClass.FindField("CI");
            this.LongitudeIndex = pFeatureClass.FindField("Longitude");
            this.LatitudeIndex  = pFeatureClass.FindField("Latitude");
            this.LevelIndex     = pFeatureClass.FindField("Level");
        }
Ejemplo n.º 4
0
        public OperateDefectLayer(string name)
        {
            IFeatureWorkspace featureWorkspace = MapWorkSpace.getWorkSpace();

            string path = System.Configuration.ConfigurationSettings.AppSettings["GisPath"].ToString();

            //若不存在shp文件,则创建
            if (!DefineLayer.findLayer(path, name))
            {
                new CreateLayer(path, name).CreateDefectLayer();
            }

            //IFeatureClass pFeatureClass = featureWorkspace.OpenFeatureClass(name);
            //IFeatureLayer flayer = new FeatureLayer();
            //pFeatureLayer.FeatureClass = pFeatureClass;

            pFeatureClass = featureWorkspace.OpenFeatureClass(name);
            pFeatureLayer = new FeatureLayer();
            pFeatureLayer.FeatureClass = pFeatureClass;

            //pFeatureLayer = GISMapApplication.Instance.GetLayer(name) as IFeatureLayer;
            //pFeatureClass = pFeatureLayer.FeatureClass;
            this.GXIDIndex      = pFeatureClass.FindField("GXID");
            this.GYIDIndex      = pFeatureClass.FindField("GYID");
            this.LevelIndex     = pFeatureClass.FindField("Level");
            this.RecePowerIndex = pFeatureClass.FindField("RecePower");
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 刷新GSM图层(包含900,1800及基站图层)
        /// </summary>
        public bool RefreshCellLayer(string layerName)
        {
            IFeatureWorkspace featureWorkspace = MapWorkSpace.getWorkSpace();

            string path = System.Configuration.ConfigurationSettings.AppSettings["GisPath"].ToString();

            //若不存在shp文件,则创建
            if (!DefineLayer.findLayer(path, layerName))
            {
                //new CreateLayer(path, layerName).Test();
                new CreateLayer(path, layerName).CreateCellLayer();
            }
            //RefreshGSM900BTS();
            return(RefreshGSM900Cell());
            //RefreshGSM1800BTS();
            //RefreshGSM1800Cell();\
        }
        public OperateSelectPointsLayer(string layername)
        {
            IFeatureWorkspace featureWorkspace = MapWorkSpace.getWorkSpace();
            string            path             = System.Configuration.ConfigurationSettings.AppSettings["GisPath"].ToString();

            //若不存在shp文件,则创建
            if (!DefineLayer.findLayer(path, layername))
            {
                new CreateLayer(path, layername).CreateSelectPointLayer();//目前有问题,但是理论上不需要新建
            }
            pFeatureClass = featureWorkspace.OpenFeatureClass(layername);
            pFeatureLayer = new FeatureLayer();
            pFeatureLayer.FeatureClass = pFeatureClass;

            CIIndex    = pFeatureClass.FindField("CI");
            FromIndex  = pFeatureClass.FindField("fromName");
            LonIndex   = pFeatureClass.FindField("Lontitude");
            LatIndex   = pFeatureClass.FindField("Latitude");
            AziIndex   = pFeatureClass.FindField("Azimuth");
            RecPwIndex = pFeatureClass.FindField("ReceivePW");
        }