2

I am trying to merge features (polygons) from 7 subregions in ArcGIS (v10.x). Merge goes fine but when I do any other process on it (e.g. Adding a field, calculations etc), the merged file is corrupted. When I want to view the shapefile I get a message "Open Failed ... Number of shapes do not match number of table records"

I tried to check geometry of the merged file (before any process was launched) and found 4 self-intersections. I tried to repair geometry to fix them but it did not help!


The version I am using is 10.2.0.3348. Unfortunately the files are heavy (each over 2GB, there are 7) to upload. Besides, they are from the Provincial Ministry and I am not sure if I could put them in the public domain.

I received the data as a geodatabase (certain forest operations in individual management units of a region). I need to extract a few variables from this data to join with another large dataset at regional scale for further analyses (décisions are at regional scale). I had earlier scripted the entire process in Python (which was working fine on several other regions). Since my script was always looking for shapefiles (and moreso I am unsure of working with geodatabases directly), I extracted individual shapefiles.

The initial process is supposed to merge the shapefiles into a region, add a few fields and calculate them. The merge goes through but no other process on it (e.g. add field).

@Polygeo, the process works on a subset (perhaps the subset did not have self-intersection issues)?

I displayed all the data in ArcMap, exported them as individual shapefiles, merged, made a new copy (through export) of the merge, and still have the same problem.

  • 2
    "v10.x" references four distinct releases of ArcGIS. Have you actually tried 10.0sp5, 10.1sp1, 10.2.2, and 10.3? You may need to publish your shapefile for anyone to figure out what has gone wrong. – Vince Dec 19 '14 at 21:17
  • Would you be able to edit your question to include the precise version of ArcGIS for Desktop that you are using and more details of the steps and data involved, please? For example, are you able to take a subset of your data through the same procedure and to reproduce the problem. – PolyGeo Dec 19 '14 at 21:19
  • I recommend running Integrate on each Shapefile. Use a small tolerance 1 ft or 1 meter. This will fix self intersections. – klewis Jan 16 '16 at 15:38
1

Without knowing all the information (as you have already mentioned above like Version, steps you did etc.), it seems like a general problem I have had many times: The problem (maybe) is the shape itself. It´s an old buggy format, for example sometime when I have to use shapes and erase geometries when I get the same error.

If you want to work with shapes (this works for me):

  • Load your (original) shapes into ArcGIS
  • Export your (original) shapes again (table of contents, right click, export)
  • merge your Data, use your (new) exported shapes --> should work now

If you want to do it without shapes and prevent such problems in future:

  • Export your data to an geodatabase --> if it´s in there, treat it like a shape without problems

If you want to use the geodatabase (recommend, because your data is heavy) you should only work within the *.gdb. Do not export the Data to an *.shp (never in your workflow), do the merge with data from a *.gdb, maybe the original data or an export to a new *.gdb. My experiences with shapes are that they are limited: e.g. if you merge, does all your fields have enough characters for long text fields?

  • Hightower, after merge, I exported the feature class to a geodatabase, then relaunched Add field. I have the same problem .... execution error saying the feature class does not exist... And when I try to display, the message is that shape and record mismatch. I note that after Add Field is launched, ".sbx" file gets deleted. – uvepa Dec 22 '14 at 19:41
  • 1
    I expressed myself unclear (In Addition: never have had data heavy as yours - Are shapes not limited to 2GB?!; my answer is only a suggestion based on my experience, not a ready-to-use solution): If you want to use the geodatabase (recommend, because your data is heavy) you should only work within the *.gdb. Do not export the Data to an *.shp (never in your workflow), do the merge with data from a *.gdb, maybe the original data or an export to a new *.gdb. My experiences with Shapes are that they are limted: e.g. if you merge, does all your fields have enough characters for long text fields? – André Dec 22 '14 at 22:26
  • Merci, Andre! You may be right, it could have been an issue of file size as well. Although the individual files are over 2GB (before merge), each component file is below 2GB (a max of 1.8GB). Thanks for the note, I was not aware of size limitation of shapes. Yes, the long text fields were truncated. Will try to stay with gdb. Thanks, once again! – uvepa Dec 23 '14 at 12:15
  • 1
    Thanks once again! The problem was fixed just by working within a gdb. – uvepa Dec 24 '14 at 13:47
  • Good to know. You are welcome! – André Dec 28 '14 at 17:37

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.