4

Because I am learning QGIS and I had to delete records in a attribute table, I made a copy (project > save as > saving as 'project_copy' before deleting attributes. To be safe...

So I deleted the attributes in the project_copy. But to my surprise, I see that the deleted attributes are also deleted in the original project!? There seems to be a link between both projects although I didn't ask for...

Did I really lose the deleted attributes?

Is there a way to restore the deleted attributes?

1
  • 3
    You seem to have missed the data use model fundamentals used by most GIS software -- Data does not exist in the map project, just the drawing rules. So yes, if you alter a shared data source in one project, it's altered in both. The probability of restoration is outside our ability to judge -- it depends on where you got the data, and how you saved it.
    – Vince
    Jun 25, 2017 at 19:11

1 Answer 1

10

Short: Yes, you lost the records or attributes by deleting them.

QGIS project files - in general - only store references to data (in files, databases or from services). The same is true for most other GIS!

You need to duplicate the data files before deleting to keep a backup. If you don't have a backup, you're probably out of luck.

4
  • I also duplicated the data in the project (right click on the shape file > duplicate), but then again, the changes I made in the duplicated shape file were also deleted in the original shape file... I don't understand it... Very dangerous for 'newbies' :-( Jun 25, 2017 at 19:16
  • 5
    Duplicating a layer in a GIS does not create a copy of the data. There are just two references to the same data source.
    – underdark
    Jun 25, 2017 at 19:17
  • 4
    'Save As' and give it a new name, rather than duplicate, to make a completely separate copy of your data. Jun 25, 2017 at 19:38
  • Thanks Martin, I will keep it in mind for the next 'learning' project ;-) Jun 25, 2017 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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