Problem:  Unable to maintain ObjectIDs when exporting a feature class to a new feature class

相关信息
Article ID: 45625
Bug Id: N/A
Software:
ArcGIS for Desktop Advanced 10.2, 10.1, 10.2.1, 10.3, 10.3.1, 10.2.2
ArcGIS for Desktop Basic 10.2, 10.2.1, 10.3, 10.3.1, 10.2.2, 10.1
ArcGIS for Desktop Standard 10.2.1, 10.1, 10.2, 10.3.1, 10.2.2, 10.3
ArcSDE 9.0, 9.1, 9.2, 10.1, 9.3, 10.2.1, 10.2, 10, 10.2.2, 9.3.1
Platforms: N/A

问题描述
When exporting a feature class to a new feature class, the original ObjectIDs are not maintained in the new feature class. Occasionally, the original ObjectIDs must be maintained because they are used in existing workflows or functions.

When features are deleted or edited, the ObjectID range can vary and the order can change. For example, the values may start from a number other than 1, or there are large sections of numbers missing, such as 1- 10, 25 – 50, and so on. This is because when features or records are deleted or edited, ObjectIDs continually build in sequential order and do not replace values which were deleted.

For more information, refer to the following article,
FAQ: Are ObjectID values repeated for features in a feature class or for records in a table?

原因
The regeneration of ObjectIDs after exporting or creating a new output feature class is by design; ArcGIS assigns a new set of ObjectIDs to a feature class when it is exported. The ObjectIDs are unique IDs to identify rows in tables in a geodatabase and start from 1 and end at a particular number. ArcGIS automatically assigns and manages ObjectIDs to tables or feature classes when both elements are created via ArcGIS, or were created outside ArcGIS and registered with the geodatabase.
已邀请:

EsriSupport

赞同来自:

解决方案
To maintain the original ObjectIDs in the exported feature class, create a new field (for example, OriginalOIDs) in the original feature class before exporting, and populate the values using the Field Calculator.

1. In the attribute table of the feature class, create a new field and name the field as OriginalOIDs, for example.



2. Populate the values for the OriginalOIDs field using the Field Calculator. For more information, refer to the following article,
HowTo: Calculate field values from an existing field to a new field in ArcMap. The new field is assigned with values from the ObjectID field.



3. Once the new field is created in the existing feature class, export the feature class to another geodatabase. The new feature class has the new ObjectID field and the OriginalOIDs field with the necessary values in the attribute table.





    其它相关参考
    1. ArcGIS Help: Calculate Field
    2. ArcGIs Help: Fundamentals of field calculations
    3. ArcGIS Help: Making simple field calculations
    4. FAQ: Are ObjectID values repeated for features in a feature class or for records in a table


    创建及修改时间
    Created: 10/12/2015 Last Modified: 10/29/2015
    原文链接
    http://support.esri.com/en/kno ... 45625

    要回复问题请先登录注册