How to create a feature dataset


Summary This document 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, a network dataset, a terrain dataset, or a geometric network.


Creating a feature dataset

In addition to housing spatially related feature classes, there are additional situations in which users apply feature datasets in their geodatabases, including the following:
  • To organize thematically related feature classes—Sometimes, users organize a collection of feature classes for a common theme into a single feature dataset. For example, users can have a feature dataset for water that contains hydro points, hydro lines, and hydro polygons.
  • To organize data access based on database privileges—Sometimes, users organize data access privileges using feature datasets. All feature classes contained within a feature dataset have the same access privileges. For example, users may need to use more than one feature dataset to segment a series of related feature classes to account for differing access privileges between users. Each group has editing access to one of the feature datasets and its feature classes but no edit access for the others.
  • To organize feature classes for data sharing—In some data-sharing situations, collaborating organizations may agree on a data sharing schema for sharing datasets with other users. In these situations, you may use feature datasets as folders to organize collections of simple feature classes for sharing with others.
The IFeatureWorkspace::CreateFeatureDataset method can be used to create a new 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.
See How to create a predefined spatial reference for steps on creating a predefined spatial reference object. There is a vast array of predefined spatial reference systems based on the values from the European Petroleum Survey Group (EPSG) database, which is becoming an industry standard. See http://www.epsg.org for more information.
If you are creating feature datasets within different releases of the geodatabase, How to construct a high or low precision spatial reference will walk you through creating spatial references in 9.2 and pre-9.2 geodatabases.
 
If you need to create a coordinate system with custom properties, How to create a custom geographic coordinate system and How to create a custom projected coordinate system will walk you through these tasks.
 
See the following code example:
 
[Java]
static IFeatureDataset createFeatureDataset(IWorkspace workspace, String fdsName,
    ISpatialReference fdsSR)throws Exception{
    IFeatureWorkspace featureWorkspace = new IFeatureWorkspaceProxy(workspace);
    return featureWorkspace.createFeatureDataset(fdsName, fdsSR);
}
Once the feature dataset has been created, you can populate your geodatabase with the following datasets:
  • Feature classes that will be held in your feature dataset and populate their contents (that is, add features). See How to create a feature class.
  • Optional geodatabase objects to your feature dataset to model relationships and add rich behavior. Options include adding a topology, a network dataset, a terrain, or a geometric network.


See Also:

How to create a feature class




Development licensing Deployment licensing
ArcView ArcView
ArcEditor ArcEditor
ArcInfo ArcInfo
Engine Developer Kit Engine Runtime: Geodatabase Update