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.

This is getting worse... I created a project with about 6 vector layers (which I digitised) with some raster tiles. It is stored locally on my Windows 7 PC, running QGIS 2.0

The project was fine until I came to open it yesterday, when I got the Bad Layers dialogue. Entering the correct paths does not fix it.

I've opened up various iterations of this project I had made, and my backups & they're all broken. Some I definitely experimented with Tools/Scripts (IRO my other post), but I don't think I had in the earlier ones. One of these projects' "bad layers" is a temp output from a tool.

Not sure if the time coincides, but the list of Recent Projects has reverted to that of some weeks ago. I did a System Restore, which assured me my data was safe, but as I'm investigating, it suggests this is the culprit - if the temporary file in AppData has gone that would trip it up.

Where is the "recently used files" list - is that in AppData too? (this is less of a problem, just a possible clue to the above)

I've skimmed the .qgs file in Notepad++ to see if I could identify these layers, but can't work it out. Can this be edited like the old ArcView .apr files?

share|improve this question

2 Answers 2

You can surely edit your .qgs project file in Notepad++, but you have to restore the data that was in temp folders anyway. If you can't get it working again, start a new project and add the layers from source. You can then compare the structure of the two project files. This might prevent you from doing the styling again (if that was much work).

I suggest to save everything important always in tif, shapefiles or spatialite databases to avoid such mess.

The recently used files list should only contain project files, not the data sources you are missing.

share|improve this answer
    
Thanks, yes there is quite a lot of styling that I was hoping to to not have to re-do. In comparing the project structure, can I just copy styling text over? –  user3418765 Apr 5 at 7:07
    
If you find the data sources (or you can recreate them), you can replace them in the original project file manually. I think that is easier than copying the style. But you can make a backup and try both. –  Andre Joost Apr 5 at 7:08
    
I think those layers have been swept away & are irrecoverable - but I don't need those. I've found one on the QGS file - I can't just delete that? –  user3418765 Apr 5 at 7:10
    
I know the recently used list is projects, but why has it changed to earlier projects - I assume the System Restore? –  user3418765 Apr 5 at 7:10
1  
Yes, system restore might overwrite that. It could be somewhere in the registry. - The Handle Bad Layers dialogue should delete unrecovered layers, that should equal deleting it from the project file. After saving, the project should open normally. –  Andre Joost Apr 5 at 7:12

Resolved this after it happened again. Nothing to do with the "recently used files": It seems that System Restore removes the SHX files...despite Windows assuring that my data will be safe...

As mentioned in this discussion: http://forums.esri.com/Thread.asp?c=93&f=986&t=129364

I was able to recover a previous version of the folder (useful tool in Windows 7). Hope this helps someone else.

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.