This document is archived and information here might be outdated.  Recommended version.


Creating feature datasets (ArcObjects .NET 10.5 SDK)

Creating feature datasets


Summary
This topic describes the process of creating a feature dataset. A feature dataset is a collection of related feature classes that share a common coordinate system. Feature datasets are used to spatially or thematically integrate related feature classes. Their primary purpose is for organizing related feature classes into a common dataset for building a topology, network dataset, terrain dataset, or geometric network.

About creating feature datasets

The IFeatureWorkspace.CreateFeatureDataset method can be used to create a  FeatureDataset given its name and spatial reference. Specifying the spatial reference is an important aspect of defining a feature dataset. This includes its coordinate system—either geographic or a specific projection—as well as coordinate units and tolerances for x-,y-,z-, and m-values. All feature classes in the same feature dataset must share a common coordinate system and x,y coordinates of their features should fall within a common spatial extent.
For information on creating a predefined spatial reference object, see Using the SpatialReferenceEnvironment. There is a vast array of predefined spatial reference systems. Many are based on information from the European Petroleum Survey Group (EPSG) Geodetic Parameter Dataset, which is becoming an industry standard. The EPSG Geodetic Parameter Dataset is maintained by the geodesy subcommittee of the International Oil & Gas Producers (OGP) Surveying & Positioning committee. For more information, see http://www.epsg.org.
If different releases of the geodatabase are used, see Constructing a high- or low-precision spatial reference, which discusses how to create spatial references in ArcGIS 9.2 and later geodatabases, as well as in pre-9.2 geodatabases.
If a coordinate system with custom properties is needed, see Creating a custom geographic coordinate system and Creating a custom projected coordinate system.
See the following code example:
[C#]
public IFeatureDataset CreateFeatureDataset_Example(IWorkspace workspace, string
    fdsName, ISpatialReference fdsSR)
{
    IFeatureWorkspace featureWorkspace=(IFeatureWorkspace)workspace;
    return featureWorkspace.CreateFeatureDataset(fdsName, fdsSR);
}
[VB.NET]
Public Function CreateFeatureDataset_Example(ByVal workspace As IWorkspace, ByVal fdsName As String, ByVal fdsSR As ISpatialReference) As IFeatureDataset
    Dim featureWorkspace As IFeatureWorkspace=CType(workspace, IFeatureWorkspace)
    Return featureWorkspace.CreateFeatureDataset(fdsName, fdsSR)
End Function
Once the feature dataset has been created, the following geodatabase objects can be added to it:
  • Feature classes—For more information about how to create a feature class in a feature dataset, see Creating feature classes
  • Relationship classes—For more information about how to create a relationship class in a feature dataset, see Creating relationship classes.
  • Advanced datasets that can be used to model relationships and add rich behavior. These include topologies, network datasets, terrains, and geometric networks.


See Also:

Creating feature classes




To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing Deployment licensing
ArcGIS Desktop Basic ArcGIS Desktop Basic
ArcGIS Desktop Standard ArcGIS Desktop Standard
ArcGIS Desktop Advanced ArcGIS Desktop Advanced
Engine Developer Kit Engine: Geodatabase Update