|Creating and Populating A Geodatabase
This sample creates a new Personal GeoDatabase and then executes various
functions that populate and configure the database suitably to support a utility
application. The resultant database created is similar to the Greeley database used
in the tutorials. The VB.Net and C# version demonstrates using a XML file to get the metadata needed to construct the geodatabase.
The steps that are executed are as follows:
- Database created
- Shapefiles loaded into new dataset within the database
- Tables created
- Subtypes added
- Domains added
- Domains assigned
- Various fields added to tables
- Relationship class created
- Relationships established between classes
- Relationship rules added
- Network created
- Connectivity rules created
How to use:
Start MS Visual Basic 6 and open the project file BuildGreeley.vbp
(for the VB.Net and C# version, start MS Visual Studio .Net and open the solution file CreateAndPopulateAGeodatabase.sln).
The project must be compiled to an EXE. From the File
menu select Make (for the VB.Net and C# version, from the Build menu select Build Solution). This will create the EXE.
Execute the compiled program.
When the form appears press the GO! button. This will execute
the various steps outlined above.
Inspect the resultant Personal GeoDatabase using either ArcMap or
ArcCatalog, and examine the various database entries created.
||Visual Basic Module containing functions.
||VB Form file defining UI.
||VB Project File for sample.
||Compiled project application.
IDatasetName, IFeatureClassName, IFeatureDatasetName, IFeatureWorkspace, IFieldChecker, IFields, IGeographicCoordinateSystem, IGeometryDef, IGeometryDefEdit, IName, IProjectedCoordinateSystem, IPropertySet, ISpatialReference, ISpatialReferenceFactory, IVersionedObject, IWorkspaceFactory, IWorkspaceName