ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Feature Class To Geodatabase

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Converts one or more feature classes or feature layers to geodatabase feature classes.

Usage

  • 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:\base\streams.shp, the output feature class will be named streams.

  • If the name already exists in the output geodatabase, a number will be appended to the end to make the feature class name unique (for example, rivers_1).

  • This tool does not support annotation.

  • Learn more about how to control the output feature class name with the Feature Class to Feature Class tool

Syntax

FeatureClassToGeodatabase(Input_Features, Output_Geodatabase)
ParameterExplanationData Type
Input_Features
[Input_Features,...]

One or more feature classes or feature layers to be imported into a file, personal, or enterprise geodatabase.

Feature Layer
Output_Geodatabase

The output or destination geodatabase. This can be a file, personal, or enterprise geodatabase.

Feature Dataset; Workspace

Derived Output

NameExplanationData Type
Derived_Geodatabase

The geodatabase, or geodatabase feature dataset, containing the new feature classes.

Workspace; Feature Dataset

Code sample

FeatureClassToGeodatabase example (Python window)

The following Python window script demonstrates how to use the FeatureClassToGeodatabase function in immediate mode.

import arcpy
arcpy.env.workspace = 'C:/data'
arcpy.FeatureClassToGeodatabase_conversion(['climate.shp', 'majorrds.shp'],
                                           'C:/output/output.gdb')
FeatureClassToGeodatabase example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the FeatureClassToGeodatabase function.

# Name: FeatureClassToGeodatabase_Example2.py
# Description: Use FeatureClassToGeodatabase to copy feature classes
#  to geodatabase format
 
# Import modules
import arcpy
 
# Set environment settings
arcpy.env.workspace = 'C:/data'
 
# Set local variables
in_features = ['climate.shp', 'majorrds.shp']
out_location = 'C:/output/output.gdb'
 
# Execute FeatureClassToGeodatabase
arcpy.FeatureClassToGeodatabase_conversion(in_features, out_location)

Environments

  • Current Workspace
  • Scratch Workspace
  • Output Coordinate System
  • Geographic Transformations
  • Extent
  • XY Resolution
  • XY Tolerance
  • Output has M values
  • M Resolution
  • M Tolerance
  • Output has Z values
  • Default Output Z Value
  • Z Resolution
  • Z Tolerance
  • Qualified Field Names
  • Output CONFIG Keyword
  • Auto Commit
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • Output XY Domain
  • Output M Domain
  • Output Z Domain

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • About loading data into existing feature classes and tables
  • Copy Features
  • Export to CAD
  • Import from CAD
  • Loading data in the Catalog tree
  • About loading data in ArcMap
  • Geodatabases
  • An overview of the To Geodatabase toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal