예제 #1
0
 public MemFeatureClass(MemDataset dataset, string name, IFields fields, IGeometryDef geometryDef)
 {
     _dataset     = dataset;
     _name        = name;
     _fields      = fields;
     _geometryDef = geometryDef;
 }
예제 #2
0
        public bool DeleteDataset(string dsName)
        {
            MemDataset dataset = this[dsName] as MemDataset;

            if (dataset != null)
            {
                _datasets.Remove(dataset);
                return(true);
            }

            return(false);
        }
예제 #3
0
        public int CreateDataset(string name, gView.Framework.Geometry.ISpatialReference sRef)
        {
            if (this[name] != null)
            {
                _errMsg = "Dataset " + name + " already exists!";
                return(-1);
            }
            MemDataset dataset = new MemDataset(this, name, sRef);

            _datasets.Add(dataset);

            return(_datasets.IndexOf(dataset));
        }
예제 #4
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);
        }