Create Feature Dataset (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Tools" |
Creates an empty feature dataset in the output location —
an existing ArcSDE, file or personal geodatabase.
Usage tips
The following environment settings affect this tool: workspace, scratch workspace, 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
CreateFeatureDataset_management <out_dataset_path> <out_name> {spatial_reference}
Parameter | Explanation | Data Type |
<out_dataset_path> |
The ArcSDE, file or personal geodatabase (it must already exist) in which the Output Feature Dataset will be created. |
Workspace |
<out_name> |
The name of the feature dataset to be created. |
String |
{spatial_reference} |
The spatial reference of the output feature dataset. 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 spatial reference properties dialog and select an existing dataset, all spatial reference properties from that dataset (coordinate system, domains and tolerances) will be used. The recommended way to specify the coordinate system at the command line is to create a variable. Right click and choose insert variable. This will allow you to use the spatial reference properties dialog to set the coordinate system. |
Spatial Reference |
CreateFeatureDataset_management C:\workspace\PortlandOR.gdb Transportation spatial_reference1
Scripting syntax
About getting started with writing geoprocessing scripts
CreateFeatureDataset_management (out_dataset_path, out_name, spatial_reference)
Parameter | Explanation | Data Type |
out_dataset_path (Required) |
The ArcSDE, file or personal geodatabase (it must already exist) in which the Output Feature Dataset will be created. |
Workspace |
out_name (Required) |
The name of the feature dataset to be created. |
String |
spatial_reference (Optional) |
The spatial reference of the output feature dataset. 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 spatial reference properties dialog and select an existing dataset, all spatial reference properties from that dataset (coordinate system, domains and tolerances) will be used. The recommended way to specify the coordinate system at the command line is to create a variable. Right click and choose insert variable. This will allow you to use the spatial reference properties dialog to set the coordinate system. |
Spatial Reference |
# create.py # Creates a folder, personal geodatabase and feature dataset # Create the Geoprocessor object import arcgisscripting, sys, string, os gp = arcgisscripting.create() # Local variables... output_location = "C:/project93" output_folder = "data" output_gdb_location = output_location + "/" + output_folder personal_gdb = "montgomery.mdb" output_personal_gdb = output_gdb_location + "/" + personal_gdb output_feature_dataset = "water" try: # Process: Create Spatial Reference... template = "c:/arcgis/arctutor/buildingageodatabase/Montgomery.mdb/Landbase/parcels" sr = gp.CreateSpatialReference_management("#", template, "", "", "", "", "0") # Process: Create Folder... gp.CreateFolder_management(output_location, output_folder) gp.refreshcatalog(output_location) # Process: Create Personal GDB... gp.CreatePersonalGDB_management(output_gdb_location, personal_gdb ) gp.refreshcatalog(output_personal_gdb) # Process: Create Feature Dataset... gp.CreateFeatureDataset_management(output_personal_gdb, output_feature_dataset, sr) except: # If an error occurred while running a tool print the messages print gp.GetMessages()