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 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 Feature Class

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

Summary

Converts a shapefile, coverage feature class, or geodatabase feature class to a shapefile or geodatabase feature class.

Usage

  • The Field Map parameter controls how the input fields in the Input Features will be written to the Output Features.

    • To remove fields during processing, delete output fields from the Field Map. This will not affect the input.
    • The data type of an output field will default to the same as the data type of the first input field (of that name) it encounters. The data type may be changed manually at any time to any valid data type.
    • There are a number of merge rules available: first, last, join, sum, mean, median, mode, minimum, maximum, standard deviation, and count.
    • When using a merge rule of Join, you can specify your own delimiter such as a space, comma, period, dash, and so on. If you want to use a space, make sure your mouse pointer is at the start of the input box and click the space bar once.
    • You can specify the start and end positions of text fields using the format option.
    • Standard deviation should not be performed on a single input because values cannot be divided by zero, so standard deviation is not a valid option for single inputs.
      • Learn more about how to perform field mapping
      • Learn more about mapping fields in scripts

  • An SQL expression can be used to select a subset of features. For further details on the syntax for the Expression parameter, see Building an SQL Expression or SQL Reference.

  • When converting geodatabase data that has subtypes or domains to a shapefile, both the subtype and domain codes and descriptions can be included in the output. Use the Transfer field domain descriptions geoprocessing environment to control this behavior. By default, only domain and subtype codes will be included in the output, not descriptions.

    Note:

    Conversion to shapefiles with subtype and domain descriptions may take more time (slower performance) than without descriptions. If you do not require the subtype and domain descriptions in your shapefile output, it is recommended you use the unchecked default behavior of the Transfer field domain descriptions environment (False or NOT_TRANSFER_DOMAINS in Python) to achieve best performance.

Syntax

arcpy.conversion.FeatureClassToFeatureClass(in_features, out_path, out_name, {where_clause}, {field_mapping}, {config_keyword})
ParameterExplanationData Type
in_features

The feature class or feature layer that will be converted.

Feature Layer
out_path

The location in which the output feature class will be created. This can be either a geodatabase or a folder. If the output location is a folder, the output will be a shapefile.

Workspace;Feature Dataset
out_name

The name of the output feature class.

String
where_clause
(Optional)

An SQL expression used to select a subset of features. For more information on SQL syntax see the help topic SQL reference for query expressions used in ArcGIS.

SQL Expression
field_mapping
(Optional)

The fields and field contents chosen from the input feature class. You can add, rename, or delete output fields as well as set properties such as data type and merge rule.

Learn more about choosing and setting the output fields.

You can use the ArcPy FieldMappings class to define this parameter.

Field Mappings
config_keyword
(Optional)

Learn more about configuration keywords

String

Derived Output

NameExplanationData Type
out_feature_class

The output feature class.

Feature Class

Code sample

FeatureClassToFeatureClass example 1 (Python window)

The following Python window script demonstrates how to use the FeatureClassToFeatureClass tool in immediate mode.

import arcpy
arcpy.env.workspace = "C:/data/GreenvalleyDB.gdb/Public Buildings"
arcpy.FeatureClassToFeatureClass_conversion("buildings_point", 
                                            "C:/output/output.gdb", 
                                            "buildings_point")
FeatureClassToFeatureClass example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the FeatureClassToFeatureClass tool.

# Name: FeatureClassToFeatureClass_Example2.py
# Description: Use FeatureClassToFeatureClass with an expression to create a subset
#  of the original feature class.  
 
# Import system modules
import arcpy
 
# Set environment settings
arcpy.env.workspace = "C:/data/GreenvalleyDB.gdb/Public Buildings"
 
# Set local variables
inFeatures = "buildings_point"
outLocation = "C:/output/output.gdb"
outFeatureClass = "postoffices"
delimitedField = arcpy.AddFieldDelimiters(arcpy.env.workspace, "NAME")
expression = delimitedField + " = 'Post Office'"
 
# Execute FeatureClassToFeatureClass
arcpy.FeatureClassToFeatureClass_conversion(inFeatures, outLocation, 
                                            outFeatureClass, expression)

Environments

  • Current Workspace
  • Output Coordinate System
  • Extent
  • Geographic Transformations
  • 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
  • Maintain Attachments
  • Auto Commit
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • Output XY Domain
  • Output M Domain
  • Output Z Domain
  • Transfer Field Domain Descriptions

Licensing information

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

Related topics

  • About loading data into existing feature classes and tables
  • Copy Features
  • 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

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

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