arcengine 数据转换和迁移函数说明
http://edndoc.esri.com/arcobjects/9.2/NET/c45379b5-fbf2-405c-9a36-ea6690f295b2.htm
SummaryThis topic discusses the different classes and interfaces that can beused to transfer datasets from one geodatabase to another, includingthe advantages and disadvantages of each.
Development licensingDeployment licensingArcViewArcViewArcEditorArcEditorArcInfoArcInfoEngine Developer KitEngine Runtime
In this topic
Overview of data conversion and transferWithinthe geodatabase and geodatabase user interface (UI) libraries, thereare five main interfaces involved with transferring datasets fromone workspace to another. See the following topics:
- Overview of data conversion and transfer
- Name objects and conversion methods
- IFeatureDataConverter and IFeatureDataConverter2
- IGeoDBDataTransfer
- IExportOperation
- IDataset.Copy
- IWorkspaceFactory.Copy and IWorkspaceFactory.Move
Overview of data conversion and transferWithinthe geodatabase and geodatabase user interface (UI) libraries, thereare five main interfaces involved with transferring datasets fromone workspace to another. See the following topics:
- IFeatureDataConverter and IFeatureDataConverter2
- IGeoDBDataTransfer (also known as copy/paste)
- IDataset (specifically, the Copy method)
- IWorkspaceFactory (specifically, the Copy and Move methods)
- IExportOperation
- IFeatureDataConverter—Usewhen copying a single dataset or feature dataset and fine-grainedcontrol is necessary. This includes applying a query filter to restrictthe rows that are copied, modifying the geometry definition, andapplying a configuration key. Also useful for transferring datasetsfrom one data source to another.
- IGeoDBDataTransfer—Use when copying one or more geodatabase datasets within the same geodatabase or to another geodatabase.
- IExportOperation—Usewhen copying a single dataset to another workspace and a query filteror selection set is necessary. Also useful for transferring datasetsfrom one data source to another.
- IDataset.Copy—Usewhen copying a dataset from a file-based data source (such as ashapefile, a database file [DBF] table, or a coverage feature class) toanother workspace.
- IWorkspaceFactory (Copy and Move methods)—Use when copying or moving an entire local geodatabase or an SDE connection file.
- IGdbXmlExport and IGdbXmlImport—Use when XML data is required, or working in a disconnected environment.
- IObjectLoader—Use when copying individual rows to an existing dataset.
- IGdbXmlExport and IGdbXmlImport:
- IObjectLoader:
- IObjectLoader component help (ArcGIS Desktop only)
- Create a name object of the appropriate type (that is, FeatureClassName), cast it to the IDatasetNameinterface, and set the Name and WorkspaceName properties. This optionrequires having a name object for the dataset's workspace (and featuredataset, if applicable), but this can be created in a similar fashion.
- Generate a name object from an open dataset. After casting a dataset to the IDataset interface, the FullNameproperty can be used to create a name object. This is only applicablefor existing datasets, so it isn't an option in cases where a nameobject represents a dataset to be created.
- Browse the dataset's container for its name object. An example of this is the IWorkspace.DatasetNamesmethod, which returns an enumerator of name objects for a specificdataset type. Again, this isn't an option for datasets that don't exist.
- Application of a query filter or a spatial filter to restrict the rows transferred to the new dataset.
- Application of a query filter's SubFields properties to restrict the fields transferred to the new dataset.
- Modificationof the fields used in the new dataset (to some extent). Examples ofthis include changing a field's name and length, and in some cases itstype (that is, a double field can be converted to an integer field).
- Providing a new GeometryDef object to replace the existing geometry definition.
- Setting a configuration keyword for the dataset.
- It'sslightly less configurable. In some cases this may be a disadvantage,but in cases where modification of objects like the fieldscollection isn't required, this reduces the overhead preparationinvolved.
- IExportOperation displays a progress barduring operation. This can be useful for graphical user interface (GUI)applications, but may be inappropriate for console applications orprocesses intended to be silent.
- IExportOperation is located in the GeodatabaseUI library, meaning it is only available to ArcGIS Desktop users.
- Copy requires a name object for the existing workspace and for the workspace to be created.
- Move only requires a name object for the existing workspace.