Arcpy 复制数据库
来源:互联网 发布:欧陆风云4 for mac 编辑:程序博客网 时间:2024/06/17 03:43
分别按照要素类、表格、要素数据集、栅格数据集分别将数据存储到新的数据库
import arcpyfrom arcpy import envimport os# Allow for the overwriting of file geodatabases, if they already exist #env.overwriteOutput = True# Set workspace to folder containing personal geodatabases #env.workspace = arcpy.GetParameterAsText(0)# Identify personal geodatabases #for pgdb in arcpy.ListWorkspaces("*", "FileGDB"): # Set workspace to current personal geodatabase# print pgdb env.workspace = pgdb # Create file geodatabase based on personal geodatabase# fgdb = pgdb[:-4] + "2.gdb" arcpy.CreateFileGDB_management(os.path.dirname(fgdb), os.path.basename(fgdb)) # Identify feature classes and copy to file gdb # for fc in arcpy.ListFeatureClasses(): print "Copying feature class " + fc + " to " + fgdb arcpy.Copy_management(fc, fgdb + os.sep + fc) # Identify tables and copy to file gdb # for table in arcpy.ListTables(): print "Copying table " + table + " to " + fgdb arcpy.Copy_management(table, fgdb + os.sep + table) # Identify datasets and copy to file gdb # Copy will include contents of datasets# for dataset in arcpy.ListDatasets(): print "Copying dataset " + dataset + " to " + fgdb arcpy.Copy_management(dataset, fgdb + os.sep + dataset)
0 0
- Arcpy 复制数据库
- Arcpy 复制带有要素数据集的数据库
- ArcPy复制数据
- Arcpy连接空间数据库
- [ArcPy] 初识ArcPy
- [ArcPy] ArcPy综合记录
- 数据库复制
- 数据库复制
- 复制数据库
- 数据库复制
- 数据库复制
- 数据库复制
- 数据库复制
- 数据库复制
- 数据库复制
- 数据库复制
- 数据库复制
- 数据库复制
- 边缘模糊处理
- 搜索引擎-基于solrj客户端的solr增删改查
- 1022. D进制的A+B (20)
- cocoaPods安装和使用教程
- Naive Bayes朴素贝叶斯
- Arcpy 复制数据库
- 使用NPOI导入导出标准Excel
- 做高通平台安卓驱动感言
- ssoj1021
- 素数 小讲
- java 遍历map 排序map的key和value
- test
- printf函数运行机制
- Linux下用Tar方式安装MySQL方法步骤