示例#1
0
        public void TestCreateFeatureClassWithValidArguments_Test(string pgdbFileName)
        {
            string pgdbFile = System.IO.Path.Combine(_dataDirectory, pgdbFileName);

            if (File.Exists(pgdbFile))
            {
                File.Delete(pgdbFile);
            }
            GeodatabaseUtil.CreatePersonalGeodatabase(pgdbFile);

            IWorkspaceFactory pgdbWSFactory = new AccessWorkspaceFactoryClass();
            IWorkspace        workspace     = pgdbWSFactory.OpenFromFile(pgdbFile, 0);

            ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();
            ISpatialReference        spatialReference        = spatialReferenceFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_NAD1983);

            spatialReference.SetDomain(-5120900, 900714804574.099, -9998100, 900709927374.099);

            GeodatabaseUtil.CreateFeatureClass(workspace, "Test", spatialReference, esriFeatureType.esriFTSimple, esriGeometryType.esriGeometryPoint, null, null, null, null);
        }