Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have been having issues deleting large numbers of features (> 1,000,000) from a feature class in ArcMap. I can't seem to get higher than a few thousand before it freezes indefinitely, sometimes overnight, before crashing.

Selecting the features I need and exporting is not an option here because I have to work within a specific gdb with a predetermined structure, and I'd prefer to just delete the features and not mess with deleting/replacing entire layers.

The layer contains approx. 1.2mil records. It's a file geodatabase.

Any ideas?

share|improve this question
    
How are you selecting which features should be deleted? By attribute? By location? Bulk delete of all features that are replaced by a new feature set? –  RyanDalton Oct 24 '13 at 21:23
1  
Please edit the question to include the kind of geodatabase (file, personal, workgroup, enterprise). If enterprise, please specify which RDBMS. The total feature count in the table from which you want to delete would be useful as well. –  Vince Oct 24 '13 at 21:24
    
The features are typically selected by location, sometimes by attribute. I'm dealing with large, worldwide datasets in some cases and have come across this issue before. I typically just select what I need, export it and scrap the old file, but that's not ideal in this case. –  brock Oct 24 '13 at 21:30
    
What version (ie- 10.0, 10.1, 10.2) of ArcGIS are you using? Are you doing any scripting in ModelBuilder of Python, or just using the "Delete Features" tool in ArcToolbox? –  RyanDalton Oct 24 '13 at 21:40
5  
Why not just set a Definition Query to "mask" the features instead of deleting them? –  PolyGeo Oct 24 '13 at 22:05

2 Answers 2

up vote 0 down vote accepted

What I ended up doing was creating a new GDB based on the schema from the old, and exported only the features I needed to the new GDB. Then deleted the old one and changed the filename of the new one to match. Not a tidy solution, but it works. ArcMap is much more amenable to exporting large numbers of features than it is to deleting them for some reason unknown to me.

share|improve this answer

You could use an UpdateCursor from arcpy to delete the features you want. Such as this

import arcpy
ds = 'c:\\temp\\test.gdb\\testdata'
cur,row = None, None
cur = arcpy.UpdateCursor(ds)
for row in cur:
    cur.deleteRow(row)

If you want to select only certain records - use an if statement before the delete in the loop.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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