Can I link the ObjectIDs to the FIDs?

1528
5
07-29-2016 06:30 PM
RaylaLiu
New Contributor

I have 2 dataset, A (origin) and B (destination). Each dataset has a variable called FID, which helps me to identify observations. I am creating an OD cost matrix. To do that, I load locations as origins and destinations. Now, the attribute tables for origins and destinations include ObjectID and Name. However, none of those corresponds to the FIDs I have in the original dataset. Is there a way I can link the ObjectIDs back to the FIDs, or identify my observations?

Thanks in advance!

Tags (1)
0 Kudos
5 Replies
DanPatterson_Retired
MVP Emeritus

did you run the OD matrix? and open the table OD cost matrix analysis—Help | ArcGIS for Desktop

The table conents indicate what is what

0 Kudos
RaylaLiu
New Contributor

Yes, I ran the OD matrix. I understand how items in the OD cost table link back to the OriginID and DetinationID. Those two IDs are generated when I am loading locations. The problem is that those two IDs are not the same as the FID given when I imported my dataset. For example, OriginID starts from 1, while FID in the original file starts from zero. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

if you look in the original tables, for example in a gdb, you will see that is the case.  In shapefiles, OID is generally set to 0 whereas FID is unique, although OID can be calculated to be = to FID or incremented by one. So when interpreting the result of the OD table, you need to know how the input table indices are formed

0 Kudos
RaylaLiu
New Contributor

That is my guess, in the OD table, FIDs don't show up, only OIDs do. I believe OID = FID + 1. At least, OID and FID have the same order. Thank you very much for your reply!

0 Kudos
MelindaMorang
Esri Regular Contributor

When you add/load your origins and destinations, you can use field mapping to transfer data from your original input points into the Origins and Destinations sublayers of the OD layer.  You could transfer your FID values into the Name field, or you could use the Add Field To Analysis Layer tool to add a new field (call it "Orig_FID" or something) and then map your FID into that new field.

0 Kudos