How to preserve OID's in Spatial Join done with Model Builder Python script

09-28-2011 06:19 AM
New Contributor II
I want to know how to preserve OID's in a spatial join. I have done a spatial join between a point and a polygon feature class. The output is a new point feature class with the fields of both point and polygon features (each point was given the attributes of the polygon that it is located in). I have created a Model Builder Python script to run this join and overwrite the newly creat point feature. The only problem is I need to OID's of my original point feature to persist in the output feature class. I am doing this in an SDE database. I have attached the Python script (.py) as well as the same script in .txt form.
Thank You!
0 Kudos
1 Reply
Esri Notable Contributor
I would suggest just adding a new field before doing the spatial join, and then using the field calculator to copy the OID over.
0 Kudos