What is the difference between OBJECTID, FID, and OID in ArcGIS?
There are often many friends who can’t tell the difference between OBJECTID, FID and OID, and don’t know how to apply and manage them. Today we will understand.
ObjectID fields that contain a distinct long integer that identifies each entry are required for ArcGIS Desktop compatibility in stand-alone tables and property sheets. This ID is managed by Esri software and cannot be changed manually.
01 the representation of 3 IDs in the data
ObjectID will be handled differently in shapefiles, geodatabase feature classes, and stand-alone tables.
- In the shapefile, the “FID” field contains the ObjectID, and the value starts at 0.
2. The “OBJECTID” column in the Geodatabase Elements class or in a stand-alone table within the Geodatabase holds the ObjectID with values beginning at 1.
3. In a separate dBase table, the “OID” field contains the ObjectID, and the value starts at 0.
02 How to change the 3 IDs
When editing data through ArcGIS Desktop, different ObjectID fields function differently:
- If a record in the shapefile is deleted, the FID will be renumbered so that it starts at 0 and increases sequentially. There are no gaps in the numbering.
2. If a record in the Geodatabase Element class or Geodata Database & table is deleted, the OBJECTID will not be renumbered and the interval in the list will still exist.
3. If a record in the dBase table is deleted, the OIDs will be renumbered from 0. There are no gaps in the numbering. Data transformation will cause ObjectID to be overridden.
4. When exporting the geographic database element class or converting it to shapefile format or exporting the geographic data database & table to dBase format, the records will be renumbered sequentially from 0 in the output shapefile or table.
5. When exporting or converting a geographic database element class to a new geographic database element class or exporting or converting a geographic data database & table to a new geographic data database & table, the output element class or table will be in the output element class or table. Start by renumbering the records sequentially.
Therefore, I tell you every day that exporting data again and then processing it can solve a lot of problems.
6. Note!!! It is important to be aware of these behaviors when selecting fields to join or associate tables. If a shapefile is connected to an element class using the FID and OBJECTID fields, the shapefile record with FID = 0 will not match the record in the element class, because there is no record with OBJECTID = 0 in the element class.
7. If you want to have a regular ordering of all IDs, please pay attention to my later article introduction.