Wednesday, 11 November 2015

Seeking purge function to remove layers from qgs file which are not present in Layers pane of QGIS?


I have some QGIS projects that I've been using for long time, adding and removing layers, updating reference to deleted or moved files etc.


Opening the qgs file with a text editor I see that it contains numerous references to different files, and this references are not showed on the Layer tree pane.


I have three different cases: references to existing file, references to missing files, references to database connections. I got aware of this when I opened my project on another machine, and QGIS reported a missing database connection to vector tables not present in the layer tree view.


Manually deleting references from the qgs file solved the problem, but I'm managing huge projects and it's near to impossible to manually check the project consistency. I've tried the "Remove empty layers" plugin, but the ones I'm trying to remove are not empty layers.


Is there any way to 'purge' qgis file?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...