Create Feature Class (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates an empty feature class in a geodatabase, or shapefile in a folder.
Usage tips
The type of a feature class created depends on the format of the pathname specified: a geodatabase feature class for ArcSDE and personal or file geodatabase pathnames, or a shapefile feature class for a file system folder.
The Create Feature Class function only creates simple feature classes. Custom feature classes (annotation, dimensions, and so on) can be created in ArcCatalog by right clicking the Geodatabase and selecting the "New..." option.
Learn more about Geodatabase items - Spatial index grid size
The following environment settings affect this tool: Extent, M Domain, Configuration Keyword, Coordinate System, Output has M Values, Output Spatial Grid, Output has Z Values, Default Z Value, Output XY Domain, and Output Z Domain.
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.
|
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).
|
String |
{DISABLED | SAME_AS_TEMPLATE | ENABLED} |
Determines if the feature class contains elevation values (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 |
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.
|
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).
|
String |
has_z (Optional) |
Determines if the feature class contains elevation values (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 |
# 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()