Provides access to create a new feature class in a feature dataset.
| Description | ||
|---|---|---|
![]() |
BrowseName | The browse name of the dataset. |
![]() |
CanCopy | True if this dataset can be copied. |
![]() |
CanDelete | True if this dataset can be deleted. |
![]() |
CanRename | True if this dataset can be renamed. |
![]() |
Category | The category of the dataset. |
![]() |
Copy | Copies this dataset to a new dataset with the specified name. |
![]() |
CreateFeatureClass | Creates a new FeatureClass in this FeatureDataset. |
![]() |
Delete | Deletes this dataset. |
![]() |
FullName | The associated name object. |
![]() |
Name | The name of the Dataset. |
![]() |
PropertySet | The set of properties for the dataset. |
![]() |
Rename | Renames this Dataset. |
![]() |
Subsets | Datasets contained within this dataset. |
![]() |
Type | The type of the Dataset. |
![]() |
Workspace | The workspace containing this dataset. |
| Interfaces | Description |
|---|---|
| IDataset | Provides access to members that supply dataset information. |
| CoClasses and Classes | Description |
|---|---|
| FeatureDataset | FeatureDataset Object. |
Feature classes that store simple features can be organized either inside or outside a feature dataset. Those outside a feature dataset are called standalone feature classes. Feature classes which store topological features, for example those participating in geometric networks, must be contained within a feature dataset to ensure a common spatial reference.
A FeatureDataset is a dataset that exists only in a geodatabase workspace and all the datasets contained in the FeatureDataset are also part of the same geodatabase. When programming with feature classes, you need to remember that the feature class may or may not belong to a feature dataset.
Each dataset in a geodatabase must have a unique name. In particular, each feature class in a geodatabase must have a unique name, independent of its containing feature dataset. Note that this is different from a file system model where two folders may contain files with the same local name within the folder.
The OpenFeatureClass method available in the IFeatureWorkspace interface on a workspace may be used to open any feature class in the workspace, including both stand-alone feature classes and feature classes within a feature dataset, given the (unique) name of the feature class.
A FeatureDataset is a dataset that contains feature classes that share the same spatial reference as the Feature Dataset. FeatureDatasets can also contain Geometric Networks and Relationship Classes.
public IWorkspace getWorkspacefromFeatureClass(IFeatureClass featureClass)
{
//This code to get the workspace for a feature class assumes a feature dataset exists,
//and therefore may fail.
//++ IFeatureDataset featureDataset = featureClass.FeatureDataset;
//++ return featureDataset.Workspace;
//
//This piece of code will work for both standalone feature classes and those in feature datasets.
IDataset dataset = (IDataset)featureClass;
return dataset.Workspace;
}
This code to get the workspace for a feature class assumes a feature dataset exists, and therefore may fail.
‘ This excerpt won’t work for standalone feature classes
Dim pFeatureDataset As IFeatureDataset
Set pFeatureDataset = pFeatureClass.FeatureDataset
Dim pWorkspace As IWorkspace
Set pWorkspace = pFeatureDataset.Workspace
This piece of code will work for both standalone feature classes and those in feature datasets.
Dim pDataset As IDataset
Set pDataset = pFeatureClass
Dim pWorkspace As IWorkspace
Set pWorkspace = pDataset.Workspace
IDataset Interface | IFeatureClass Interface