コード例 #1
0
        public void AddFeatureClass(MemFeatureClass fc)
        {
            DatasetElement element = new DatasetElement(fc);

            element.Title = fc.Name;

            _elements.Add(element);
        }
コード例 #2
0
        public int CreateFeatureClass(string dsname, string fcname, gView.Framework.Geometry.IGeometryDef geomDef, gView.Framework.Data.IFields fields)
        {
            MemDataset dataset = this[dsname] as MemDataset;

            if (dataset == null)
            {
                _errMsg = "Unknown dataset '" + dsname + "'";
                return(-1);
            }
            if (dataset[fcname] != null)
            {
                _errMsg = "Feature class '" + fcname + "' already exists!";
                return(-1);
            }

            MemFeatureClass featureClass = new MemFeatureClass(dataset, fcname, fields, geomDef);

            dataset.AddFeatureClass(featureClass);
            return(1);
        }