Select to view content in your preferred language

GP Tools — Include original ObjectID field in output FC

166
1
10-31-2024 08:44 AM
Status: Open
Labels (1)
Bud
by
Esteemed Contributor

For geoprocessing tools that output a new FC:

Add an Original ObjectID field to the output FC since the original FC's ObjectID values won't be preserved in the new FC's ObjectID field. 

Use case: Joining from the original FC to the new FC via a common attribute, possibly for a field calculation on the original FC. (Not all FCs have a user-defined unique ID that can be used for tabular joins.)

Example: GP tool to populate point shapes from X/Y number fields in existing FC

There are cases where we can't or don't want to add a new Unique ID field to the original FC, or export the original FC for the purpose of adding a unique ID field. Simply joining the original FC to the new FC via a common attribute is a better option.

Some GP tools already do this, such as Spatial Join. It would be great to have all other applicable tools do it, too. It could be an optional parameter in the tool.

1 Comment
RichardFairhurst

I had proposed a similar idea for the same reasons under Feature-class-to-feature-class-options-to-preserve-ObjectID-and-GlobalID. 

I agree there are numerous situations that make adding and maintaining a field in the source FC to preserve a static unique ObjectID value impossible.  And a field like that is difficult to set up in the source even when it is possible when it needs to be continuously maintained or needs to avoid having other unintended consequences to other behaviors like Editor Tracking.