Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Feature Class toolset > Tools

Create Feature Class (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Creates an empty feature class in a geodatabase, or shapefile in a folder.


Usage tips

Command line syntax
An overview of the Command Line window
CreateFeatureClass_management <out_path> <out_name> {POINT | MULTIPOINT | POLYGON | POLYLINE} {template;template...} {DISABLED | SAME_AS_TEMPLATE | ENABLED} {DISABLED | SAME_AS_TEMPLATE | ENABLED} {spatial_reference} {config_keyword} {spatial_grid_1} {spatial_grid_2} {spatial_grid_3}

Parameter Explanation Data Type
<out_path>

The ArcSDE, personal or file geodatabase, or folder in which the output feature class will be created. This workspace must already exist.

Workspace | Feature Dataset
<out_name>

The name of the feature class to be created.

String
{POINT | MULTIPOINT | POLYGON | POLYLINE}

The geometry type for the input feature class.

  • POINT
  • MULTIPOINT
  • POLYGON
  • POLYLINE

String
{template;template...}

The feature class used as a template to define the attribute schema of the output feature class.

Feature Layer
{DISABLED | SAME_AS_TEMPLATE | ENABLED}

Determines if the feature class contains linear measurement values (m-values).

  • DISABLED — The output feature class will not have m-values.
  • ENABLED — The output feature class will have m-values.
  • SAME_AS_TEMPLATE — The output feature class will have m-values if the template has m-values. If the template does not have m-values, the output feature class will not have m-values

String
{DISABLED | SAME_AS_TEMPLATE | ENABLED}

Determines if the feature class contains elevation values (z-values).

  • DISABLED — The output feature class will not have z-values.
  • ENABLED — The output feature class will have z-values.
  • SAME_AS_TEMPLATE — The output feature class will have z-values if the Template has z-values. If the Template does not have z-values, the output feature class will not have z-values.

String
{spatial_reference}

The spatial reference of the output feature class. The dialog allows you to pick a coordinate system. If you wish to control other aspects of the spatial reference (ie the xy, z, m domains, resolutions, tolerances) use the relevant environments (click the environments button). If you choose the "Import..." option on the dialog and select an existing dataset, all spatial reference properties from that dataset (coordinate system, domains and tolerances) will be used.

Spatial Reference
{config_keyword}

The configuration keyword that determines the storage parameters of the table in a Relational Database Management System (RDBMS) — ArcSDE only.

String
{spatial_grid_1}

The size of the output feature classe's spatial grid index. The following formats support spatial index grids: personal geodatabase, file geodatabase or ArcSDE geodatabase. If this value is left blank (or 0) a valid grid size will be calculated automatically.

Double
{spatial_grid_2}

The size of the output feature classe's second spatial grid index. This value must be at least 3 times larger than the first index grid. The following formats support more than one spatial index grids: file geodatabase or ArcSDE geodatabase. For more information, see the Add Spatial Index tool. Note that personal geodatabase support only one spatial index grid.

Double
{spatial_grid_3}

The size of the output feature classe's third spatial grid index. This value must be at least 3 times larger than the second index grid. The following formats support more than one spatial index grids: file geodatabase or ArcSDE geodatabase. Note that personal geodatabase support only one spatial index grid.

Double
Data types for geoprocessing tool parameters


Command line example

workspace E:\arcgis\ArcTutor\BuildingaGeodatabase
CreateFeatureclass_management montgomery.mdb\water hydrant POINT

Scripting syntax
About getting started with writing geoprocessing scripts
CreateFeatureClass_management (out_path, out_name, geometry_type, template, has_m, has_z, spatial_reference, config_keyword, spatial_grid_1, spatial_grid_2, spatial_grid_3)

Parameter Explanation Data Type
out_path (Required)

The ArcSDE, personal or file geodatabase, or folder in which the output feature class will be created. This workspace must already exist.

Workspace | Feature Dataset
out_name (Required)

The name of the feature class to be created.

String
geometry_type (Optional)

The geometry type for the input feature class.

  • POINT
  • MULTIPOINT
  • POLYGON
  • POLYLINE

String
template (Optional)

The feature class used as a template to define the attribute schema of the output feature class.

Feature Layer
has_m (Optional)

Determines if the feature class contains linear measurement values (m-values).

  • DISABLED — The output feature class will not have m-values.
  • ENABLED — The output feature class will have m-values.
  • SAME_AS_TEMPLATE — The output feature class will have m-values if the template has m-values. If the template does not have m-values, the output feature class will not have m-values

String
has_z (Optional)

Determines if the feature class contains elevation values (z-values).

  • DISABLED — The output feature class will not have z-values.
  • ENABLED — The output feature class will have z-values.
  • SAME_AS_TEMPLATE — The output feature class will have z-values if the Template has z-values. If the Template does not have z-values, the output feature class will not have z-values.

String
spatial_reference (Optional)

The spatial reference of the output feature class. The dialog allows you to pick a coordinate system. If you wish to control other aspects of the spatial reference (ie the xy, z, m domains, resolutions, tolerances) use the relevant environments (click the environments button). If you choose the "Import..." option on the dialog and select an existing dataset, all spatial reference properties from that dataset (coordinate system, domains and tolerances) will be used.

Spatial Reference
config_keyword (Optional)

The configuration keyword that determines the storage parameters of the table in a Relational Database Management System (RDBMS) — ArcSDE only.

String
spatial_grid_1 (Optional)

The size of the output feature classe's spatial grid index. The following formats support spatial index grids: personal geodatabase, file geodatabase or ArcSDE geodatabase. If this value is left blank (or 0) a valid grid size will be calculated automatically.

Double
spatial_grid_2 (Optional)

The size of the output feature classe's second spatial grid index. This value must be at least 3 times larger than the first index grid. The following formats support more than one spatial index grids: file geodatabase or ArcSDE geodatabase. For more information, see the Add Spatial Index tool. Note that personal geodatabase support only one spatial index grid.

Double
spatial_grid_3 (Optional)

The size of the output feature classe's third spatial grid index. This value must be at least 3 times larger than the second index grid. The following formats support more than one spatial index grids: file geodatabase or ArcSDE geodatabase. Note that personal geodatabase support only one spatial index grid.

Double

Data types for geoprocessing tool parameters


Script example

# Purpose: Append several feature classes together

# Create the Geoprocessor object
import arcgisscripting
gp = arcgisscripting.create()

try:
    # Set the workspace (to avoid having to type in the full path to the data every time) and the toolbox
    gp.Workspace =  "d:/project93/data"
    gp.toolbox = "management"

    # Set a variable to store the updated feature class
    out_feat_class = "mass_towns.shp"

    # Process:  Create a feature class to update
    gp.CreateFeatureclass(gp.workspace, out_feat_class, "POLYGON", "amherst.shp")

    # Process: Append the feature classes into the feature class
    gp.Append("amherst.shp;hadley.shp;pelham.shp;coldspring.shp", out_feat_class, "NOTEST")

except:
    # If an error occurred while running a tool print the messages
    print gp.GetMessages()

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.