ArcGIS 10.2.2: Adding field with unwanted effects

3243
7
Jump to solution
12-10-2015 03:10 AM
StephanieLeichsenring
New Contributor

Hello,

I've got a shapefile with different information in the attribute table. When I add a new field to the table in every field there will be added a space character in front of the entry. In addition to this some of the fields get new values and the new added field will be filled with values without having set a default value.

I got a intricated solution by exporting the shapefile in ArcMap to a new shapefile.

But does anyone know the reason for this behaviour?

0 Kudos
1 Solution

Accepted Solutions
ChrisDonohue__GISP
MVP Alum

Both Dan Patterson and Kyle Balke, GISP have important points on what may be causing the unexpected behavior.  It may be that you are trying to edit your shapefile outside the established methods, which is why it is not working correctly.  Can you elaborate on the specific processes you are doing to make the changes to your shapefile?

It would be best to ensure the process you are using is viable, as there are some processes people use that seem like they would work but actually have negative consequences.  For example, editing a shapefile attributes using Excel to change the values in the .dbf part of the shapefile - that is NOT a valid method, as it does not update the linkages between the table (.dbf) and the spatial index (.shx).  However, it is easy to assume since one can open the dbf in Excel that this is OK.

Also, the link below may prove helpful to recover files that are already showing unexpected behavior (though you probably want to figure out why they are getting corrupted first).

Recovering a corrupt shapefile:

27429 - Recover a corrupt shapefile

Chris Donohue, GISP

View solution in original post

7 Replies
DanPatterson_Retired
MVP Emeritus

Can you show a screen grab of what you mean?  This behaviour is not normal.  Also, what type of fields are you adding? text, numeric?

0 Kudos
StephanieLeichsenring
New Contributor

Below you find the normal structure of the shapefile.

Data_correct.JPG

I'm adding a text-field "fbz_neu" with 50 characters. The result of the unwantedt behaviour can be seen below.Data_failure.JPG

It's not just filling the field "fbz_neu" with unwanted numbers, it also changes entries f.e. "geom_flaec". Unfortunately I find out that the fields "zaehler" and "nenner" had been modified catastrophically.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Why are the values in the FID field unordered? Are you sorting then doing some form of calculation?

KyleBalke__GISP
Occasional Contributor III

Are you calculating the new field in ArcMap or trying to modify the underlying .dbf?

ChrisDonohue__GISP
MVP Alum

I'm seeing some of the impacts.  All the values in the field geom_fleec became zero.  zeopunkt and import_zei likewise got zeroed out.

This is definitely odd behavior.  Just curious - any idea where shapefile came from?  Any chance it was a non-GIS application that created it?  Some applications output shapefiles, but not to the full standard that is used in GIS.

Maybe also the shapefile, irrespective of its source, got corrupted?

You may also want to consider moving the data to a File Geodatabase, which tends to be more stable.

Chris Donohue, GISP

KyleBalke__GISP
Occasional Contributor III

Agreed on moving to File Geodatabase to see if this resolves the issues.

ChrisDonohue__GISP
MVP Alum

Both Dan Patterson and Kyle Balke, GISP have important points on what may be causing the unexpected behavior.  It may be that you are trying to edit your shapefile outside the established methods, which is why it is not working correctly.  Can you elaborate on the specific processes you are doing to make the changes to your shapefile?

It would be best to ensure the process you are using is viable, as there are some processes people use that seem like they would work but actually have negative consequences.  For example, editing a shapefile attributes using Excel to change the values in the .dbf part of the shapefile - that is NOT a valid method, as it does not update the linkages between the table (.dbf) and the spatial index (.shx).  However, it is easy to assume since one can open the dbf in Excel that this is OK.

Also, the link below may prove helpful to recover files that are already showing unexpected behavior (though you probably want to figure out why they are getting corrupted first).

Recovering a corrupt shapefile:

27429 - Recover a corrupt shapefile

Chris Donohue, GISP