HowTo: Calculate unique identifier values similar to Global IDs
【相关信息】
Article ID: 40668
Software:
ArcGIS - ArcEditor 10
ArcGIS - ArcInfo 10
ArcGIS - ArcView 10
ArcGIS for Desktop Advanced 10.1
ArcGIS for Desktop Standard 10.1
ArcGIS for Desktop Basic 10.1
Platforms:
Windows XP, Server 2003, Vista, Server 2008, Windows 7
【问题描述】
Global ID and GUID data types store registry style strings consisting of 36 characters enclosed in curly brackets within a geodatabase. The values are normally used to track geodatabase replication; however, they can be used for other identification purposes.
The Global ID values are automatically updated when a feature is added to a geodatabase. In contrast, the GUID values must be managed manually. These values can be created through Python.
Article ID: 40668
Software:
ArcGIS - ArcEditor 10
ArcGIS - ArcInfo 10
ArcGIS - ArcView 10
ArcGIS for Desktop Advanced 10.1
ArcGIS for Desktop Standard 10.1
ArcGIS for Desktop Basic 10.1
Platforms:
Windows XP, Server 2003, Vista, Server 2008, Windows 7
【问题描述】
Global ID and GUID data types store registry style strings consisting of 36 characters enclosed in curly brackets within a geodatabase. The values are normally used to track geodatabase replication; however, they can be used for other identification purposes.
The Global ID values are automatically updated when a feature is added to a geodatabase. In contrast, the GUID values must be managed manually. These values can be created through Python.
1 个回复
易智瑞技术支持
赞同来自:
1.A unique identifier can be calculated using the UUID (Universally Unique Identifier) Python module. The resulting string value can be modified to match the same format as the Global ID by applying an uppercase function with the addition of curly brackets.
2.Add a new field to the feature class. A GUID field type can only be added to a geodatabase feature class, and a text field type can be added to a shapefile.
Open the Field Calculator, choose the Python parser, and check the option to Show Codeblock.
3.The unique value is calculated for each row:
【其它相关参考】
【创建及修改时间】
Created: 11/19/2012
Last Modified: 7/12/2013
【原文链接】
http://support.esri.com/en/kno ... 40668
要回复问题请先登录或注册