Esempio n. 1
0
        //OK Loop
        public ZhFeatureClass GetZhFeatureClass(string featureClassName)
        {
            ZhFeatureClass ZHfeatcls = null;
            IFeatureClass  fc        = GetFeatureClass(featureClassName);

            if (fc != null)
            {
                switch (fc.ShapeType)
                {
                case esriGeometryType.esriGeometryPolygon:
                    ZHfeatcls = new ZhPolygonFeatureClass(fc);
                    break;

                case esriGeometryType.esriGeometryPolyline:
                case esriGeometryType.esriGeometryLine:
                    ZHfeatcls = new ZhPolylineFeatureClass(fc);
                    break;

                case esriGeometryType.esriGeometryPoint:
                case esriGeometryType.esriGeometryMultipoint:
                    ZHfeatcls = new ZhPointFeatureClass(fc);
                    break;
                }
            }
            return(ZHfeatcls);
        }
Esempio n. 2
0
        public ZhFeatureClass getZHFeatureClass()
        {
            if (this.m_ZHFeatureClass == null && this.Layer != null && this.Layer is IFeatureLayer)
            {
                IFeatureLayer featLayer = this.Layer as IFeatureLayer;
                switch (featLayer.FeatureClass.ShapeType)
                {
                case esriGeometryType.esriGeometryPolygon:
                    this.m_ZHFeatureClass = new ZhPolygonFeatureClass(featLayer.FeatureClass);
                    break;

                case esriGeometryType.esriGeometryPolyline:
                case esriGeometryType.esriGeometryLine:
                    this.m_ZHFeatureClass = new ZhPolylineFeatureClass(featLayer.FeatureClass);
                    break;

                case esriGeometryType.esriGeometryPoint:
                case esriGeometryType.esriGeometryMultipoint:
                    this.m_ZHFeatureClass = new ZhPointFeatureClass(featLayer.FeatureClass);
                    break;

                default:      //注记?
                    this.m_ZHFeatureClass = null;
                    break;
                }
            }
            return(m_ZHFeatureClass);
        }