I found a lot of related questions, but not completely an answer to my struggle. I can open the dbf-file in ACL and save it as dbf. I added some attributes and wanted to open it again in ArcGIS, but apparently I lose 2 columns when opening my dbf in ACL (and it does too when I open it in Excel): the objectid and the geometry.

How can I prevent this from happening or are there other options I have to join the object ID's with a new attribute that I only have in a table format (no GIS-coordinates)?


The ObjectID is internal to ArcGIS and the geometry is not stored in the dbf for a shapefile - so you are not 'losing' them as they were never in the dbf in the first place. The dbf file is an attributes only file. You are better advised to add the columns in ArcGIS and edit them there rather than 'hacking' the dbf separate from the shapefile.

Of course, if the columns you are adding are just attributes and don't impact on the geometry, then just ignore the fact that you don't see the ObjectID and Geometry columns in Excel. When you load the shapefile with your hacked DBF, ArcGIS will read the geometry out of one of the other existing parts of the Shapefile file-set... but I still wouldn't advise hacking a shapefile's dbf in this way unless you HAVE to (and I can't think of many instance where that would occur)!

If you must do it like that and must have the goemetry/objectID columns, then you will need to pull the ObjectID and geometry into the dbf. However, if you are going down this route then it may be preferable to use some other other database that is spatially enabled like PostGIS, or SpatiaLite. The easiest option to get the ObjectID and Geometry columns into such a database is to use the loaders available for importing a shapefile to postgis or spatialite.

If you don't want to use PostGis or SpatiaLite, then you'll need to convert your geometry manually into WKT or WKB and store it (possibly as a BLOB depending on the complexity of your geometry) in a column in the dbf by hand. Of course, ArcGIS won't read this column for your shapefile and automatically update the geometry, which is why you are really best advised NOT to hack the dbf outside of the GIS.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.