注册到地理数据库(Geodatabase) (数据管理)
摘要
用于将在地理数据库外部创建的要素类、表和栅格图层注册到地理数据库,以使其充分参与地理数据库功能。
用法
-
使用此工具可将在地理数据库外部创建的要素类、表和栅格图层注册到地理数据库。
-
要素类、表或栅格要素类必须先注册到地理数据库中,然后才能使其充分参与所有地理数据库功能。如果未注册到地理数据库,则只有有限的功能可用。
语法
RegisterWithGeodatabase_management (in_dataset)
参数 | 说明 | 数据类型 |
in_dataset |
支持在地理数据库外部创建的要素类、表或栅格要素类。 | Raster Layer; Table View |
代码示例
RegisterWithGeodatabase 示例 1(Python 窗口)
以下 Python 窗口脚本演示了如何在即时模式下使用 RegisterWithGeodatabase 函数。
import arcpy from arcpy import env env.workspace = "Database Connections\Connection to gpserver.sde" arcpy.RegisterWithGeodatabase_management(r'TOOLBOX.REGGDB_LZ77')
RegisterWithGeodatabase 示例 2(独立脚本)
以下独立脚本是如何在脚本中应用 RegisterWithGeodatabase 函数的简单示例。
# RegisterWithGeodatabase.py # Description: Simple example showing use of RegisterWithGeodatabase tool # Author: ESRI # Import system modules import arcpy # Set variables inTable = r"c:\connectionFiles\Connection to esriServer.sde\redlandsStreets" #Process: Use the CreateArcSDEConnectionFile function arcpy.RegisterWithGeodatabase_management (inTable)
环境
此工具不使用任何地理处理环境
相关主题
许可信息
ArcView: 否
ArcEditor: 是
ArcInfo: 是
7/10/2012