Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often get an ogr error when I try to save a shapefile after working on it in Qgis ( adding features, removing, modifying attributes.. )

The error says :
"OGR ERROR : Attempt to delete shape with feature id (-28 ) which does not exist"

Does anyone have an idea about the reason why I'm getting this error and/or how to avoid it ?

share|improve this question

I think you will not get this error if you Save between adding and removing features.

share|improve this answer
Thanks for the answer, using save between each operation may solve the problem but when working with a large number of features and a considerable amount of operation it becomes "annoying" to have to save changes to the shapefile after each action! – QgisTn Dec 13 '12 at 13:33
Ok, then try the 'Save' always before deleting anything. Until you save, the features are only stored in memory, with negative ID. 'Save' might try to save and delete them in one step, which causes the error message. Same goes to adding and deleting table columns. – AndreJ Dec 13 '12 at 13:48

Your Answer


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.