Feature Class To Geodatabase (Conversion) |
|
Release 9.2
Last modified April 2, 2008 |
![]() ![]() ![]() Print all topics in : "Tools" |
Converts one or more feature classes or feature layers to geodatabase feature classes.
Usage tips
The inputs can include shapefiles, coverage feature classes, VPF feature classes, or geodatabase feature classes. The inputs can also be feature layers (a layer in the ArcMap or ArcScene TOC or a feature layer created by the Make Feature Layer tool).
If the input is a layer with selected features, only those selected features will be written to the new output feature class.
The name of the output feature classes will be based on the name of the input feature class name. For example, if the input is c:\myworkspace\Gondor.shp, the output feature class will be named gondor.
If the name already exists in the output geodatabase, a number will be appended to the end to make it unique, for example, "_1".
This tool does not support annotation.
The following environments affect this tool: configKeyword, extent, MDomain, outputCoordinateSystem, outputMFlag, outputZFlag, scratchWorkspace, spatialGrid1, spatialGrid2, spatialGrid3, workspace, XYDomain, and ZDomain.
Command line syntax
An overview of the Command Line window
FeatureClassToGeodatabase_conversion <Input_Feature_class; Input_Feature_class...> <Output_Geodatabase>
Parameter | Explanation | Data Type |
<Input_Feature_class; Input_Feature_class...> |
One or more feature classes or fetaure layers to be imported into an ArcSDE, file or personal geodatabase. |
Feature Layer |
<Output_Geodatabase> |
The output or destination geodatabase. This can be a file or personal geodatabase, or an ArcSDE geodatabase. |
Workspace | Feature Dataset |
Workspace c:\gisdata\shps FeatureClassToGeodatabase cities.shp;counties.shp;townships.shp C:\gisdata\geodatabase.mdb
Scripting syntax
About getting started with writing geoprocessing scripts
FeatureClassToGeodatabase_conversion (Input_Features, Output_Geodatabase)
Parameter | Explanation | Data Type |
Input_Features (Required) |
One or more feature classes or fetaure layers to be imported into an ArcSDE, file or personal geodatabase. |
Feature Layer |
Output_Geodatabase (Required) |
The output or destination geodatabase. This can be a file or personal geodatabase, or an ArcSDE geodatabase. |
Workspace | Feature Dataset |
# ConvertToGDBExample.py # Description: Simple example of converting a list of shp files to SDE # Requirements: Python and the Python win32all extension # Author: ESRI # Date 1/6/2004 # Create the Geoprocessor import arcgisscripting gp = arcgisscripting.create() # Put in error trapping in case an error occurs when running tool try: # Set the workspace gp.Workspace = "c:/geodata/shapefiles" gp.FeatureClassToGeodatabase("cities.shp;counties.shp;townships.shp;province.shp", "Database Connections/Connection to Doosie.sde") except: # If an error occurred print the message to the screen print gp.GetMessages()