1.GP 工具,FeatureClassToGeodatabase
ESRI.ArcGIS.ConversionTools.FeatureClassToGeodatabase featureClassToGeodatabase = new ESRI.ArcGIS.ConversionTools.FeatureClassToGeodatabase();
featureClassToGeodatabase.Input_Features = qjFC;
featureClassToGeodatabase.Output_Geodatabase = txtDJPath.Text;
featureClassToGeodatabase.Derived_Geodatabase = "";
Geoprocessor geoprocessor = new Geoprocessor();
geoprocessor.OverwriteOutput = true;
try
{
geoprocessor.Execute(featureClassToGeodatabase, null);
}
catch (Exception ex)
{
throw ex;
}
2.GP 工具,FeatureClassToFeatureClass
ESRI.ArcGIS.ConversionTools.FeatureClassToFeatureClass featureclassToFeatureClass = new ESRI.ArcGIS.ConversionTools.FeatureClassToFeatureClass();
featureclassToFeatureClass.in_features = qjFC;
featureclassToFeatureClass.out_path = txtDJPath.Text;
featureclassToFeatureClass.out_name = newName;
Geoprocessor geoprocessor = new Geoprocessor();
geoprocessor.OverwriteOutput = true;
try
{
geoprocessor.Execute(featureclassToFeatureClass, null);
}
catch (Exception ex)
{
throw ex;
}