|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFeatureDataset
Provides access to create a new feature class in a feature dataset.
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.
Method Summary | |
---|---|
IFeatureClass |
createFeatureClass(String name,
IFields fields,
IUID cLSID,
IUID eXTCLSID,
int featureType,
String shapeFieldName,
String configKeyword)
Creates a new FeatureClass in this FeatureDataset. |
Methods inherited from interface com.esri.arcgis.geodatabase.IDataset |
---|
canCopy, canDelete, canRename, copy, delete, getBrowseName, getCategory, getFullName, getName, getPropertySet, getSubsets, getType, getWorkspace, rename, setBrowseName |
Method Detail |
---|
IFeatureClass createFeatureClass(String name, IFields fields, IUID cLSID, IUID eXTCLSID, int featureType, String shapeFieldName, String configKeyword) throws IOException, AutomationException
Use the CreateFeatureClass method in the IFeatureDataset interface to create a new feature class within a FeatureDataset. The arguments to this method are the same as to the CreateFeatureClass method in IFeatureWorkspace. However, this method requires that the spatial reference specified for the feature class to be created match the spatial reference of the feature dataset. Note that the spatial reference for the feature class to be created is specified in the GeometryDef property of the Field object for the Shape field in the supplied Fields collection. The GeometryDef object must be fully set up with information on both the spatial reference (the projected or geographic coordinate system, vertical coordinate system, the coordinate domains and the coordinate resolution values), and the spatial index for the shape Field before calling CreateFeatureClass.
The following are valid Geometry types for a new feature class (from esriGeometryType) and are set on the GeometryDef object:
esriGeometryPoint
esriGeometryMultipoint
esriGeometryPolyline
esriGeometryPolygon
esriGeometryMultiPatch
If the FeatureWorkspace the FeatureClass is being created in is a Geodatabase workspace then at a minimum the Fields object must contain the the required fields. The required fields can be obtained from the class description for the type of object you wish to create (see the RequiredFields property on IObjectClassDescription).
The Fields object passed to the Fields parameter should not be an object retrieved from another class. If the new class is going to have the same fields as an existing class, cast the existing class' fields collection to the IClone interface, clone it, and use the cloned fields collection as input for this method.
The optional CLSID parameter is used to specify what GUID to use to instantiate the object representing a feature in that FeatureClass. If "Nothing" is passed in for the CLSID, the GeoDatabase will use the CLSID corresponding to esriGeoDatabase.Feature. This is OK in most instances. If you know the FeatureClass has a custom Feature other than esriGeoDatabase.Feature, you can pass in it's GUID at this time or later call methods on the FeatureClass's IClassSchemaEdit interface.
The optional EXTCLSID parameter specifies the GUID to use to instantiate the object representing the FeatureClassExtension. This object must at least support the IClassExtension interface. If you pass in "Nothing" for the EXTCLSID, the newly created FeatureClass will not have a ClassExtension. Since ClassExtensions are not required, this is generally OK, unless the FeatureClass is for annotation, dimension lines or a custom FeatureClass that requires a ClassExtension. If you know the FeatureClass has a ClassExtension and you know the GUID for the ClassExtension, you can pass it in at this time or later call methods on the FeatureClass's IClassSchemaEdit interface.
The optional configurationKeyword parameter allows the application to control the physical layout for this table in the underlying RDBMS—for example, in the case of an Oracle database, the configuration keyword controls the tablespace in which the table is created, the initial and next extents, and other properties. The configurationKeywords for an ArcSDE instance are set up by the ArcSDE data administrator, the list of available keywords supported by a workspace may be obtained using the IWorkspaceConfiguration interface.
Note: Table or feature class names with the following prefixes are not supported:
name
- The name (in)fields
- A reference to a com.esri.arcgis.geodatabase.IFields (in)cLSID
- A reference to a com.esri.arcgis.system.IUID (in)eXTCLSID
- A reference to a com.esri.arcgis.system.IUID (in)featureType
- A com.esri.arcgis.geodatabase.esriFeatureType constant (in)shapeFieldName
- The shapeFieldName (in)configKeyword
- The configKeyword (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |