Database Reference
In-Depth Information
A list of arcpy commands
This section includes a list of a lot of useful commands that you can use to work with
geodatabases. This list has been compiled from www.esri.com .
Tool
Description
Python script example
# Create file geodatabase bestaurants.gdb in c:\gdb path.
arcpy.CreateFileGDB_management
(
"c:/gdb",
"bestaurants.gdb"
)
Create
File GDB
Creates file geodata-
bases
# Creates the VENUE_BOUNDARY feature class of type polygon; this can
be used to highlight the boundary of a given restaurant.
arcpy.CreateFeatureclass_management
(
"c:/gdb/bestaurants.gdb",
"Venue_Boundary",
"POLYGON"
)
#Creates the VENUE_FENCE feature class of type polyline; this can be
used to draw a fence around a restaurant if it has one.
arcpy.CreateFeatureclass_management
(
"c:/gdb/bestaurants.gdb",
"Venue_Fence",
"POLYLINE"
)#Creates a landmark feature class in the bestaurants geodatabase of
type point. This feature class is used to indicate a landmark such
as a building, a mall, or a train station.
arcpy.CreateFeatureclass_management
(
"c:/gdb/bestaurants.gdb",
"Landmark",
"POINT"
)
Create
Feature
class
Creates a feature class
in an existing
geodatabase
#Creates the VENUE_BOUNDARY feature class of type polygon using
Food_and_Drinks as a template feature class; this will import all
fields and spatial references to this feature class.
arcpy.CreateFeatureclass_management
(
"c:/gdb/bestaurants.gdb",
"Venue_Boundary",
"POLYGON"
"c:/gdb/bestaurants.gdb/Food_and_Drinks",
)
Search WWH ::




Custom Search