Database Reference
In-Depth Information
Copying features
This one is an interesting geoprocessing tool and probably the most widely used one. It al-
lows you to copy features from one feature class to another feature class. It accepts two
parameters: the source feature class and the full path of the destination feature class. You
do not need to create the new feature class as this tool creates it for you. Perform the fol-
lowing steps to copy features from one feature class to another feature class:
1. Open a new Python editor session and write the following code:
import arcpy
sfc_source = "c:/gdb/my_Python_gdb.gdb/
my_Python_featureclass"
sfc_dest = "c:/gdb/my_Python_gdb.gdb/
my_Python_featureclass_copy"
arcpy.CopyFeatures_management (sfc_source, sfc_dest)
input ("Feature class copied successfully, press any
key to continue...")
2. Save your file as copy_features.py under the scripts folder and then run
your script.
3. You will see that the feature class is copied and a new feature class is automatically
created, as shown in the following screenshot:
Search WWH ::




Custom Search