[Qgis-user] Layers in qgs file not present in the Layers pane
Andre Joost
andre+joost at nurfuerspam.de
Mon Sep 17 23:40:16 PDT 2012
Hi,
Am 17.09.2012 22:08, schrieb Julian Bogdani:
> Hello
> I've posted a question on gis.stackexchange.com<http://gis.stackexchange.com>
> (http://gis.stackexchange.com/questions/33608/layers-in-qgs-file-not-present-in-the-layers-pane),
> and as promised there I'm sending here a qgis project file with a phantom layer
> to use for test.
> The phantom layer is named: "plan01_2012" and references to:
> "./Planimetrie/2012/plan01_2012.tif" as you can see in lines 27 and following.
> Opening the project with QGIS no error is showed for the missing reference, and
> no layer is shown in the Layers pane.
After I put a tif file in the place to be, I could reproduce the error
(Lisboa and master). But manually adding the tif to a fresh file added
the following extra lines:
<legendlayer drawingOrder="-1" open="false"
checked="Qt::Checked" name="plan01_2012" showFeatureCount="0">
<filegroup open="false" hidden="false">
<legendlayerfile isInOverview="0"
layerid="plan01_201220120829235552845" visible="1"/>
</filegroup>
</legendlayer>
</legend>
Inserting this to your file after <legend updateDrawingOrder="true">,
the project opens normally. Maybe a bug concerning opening older version
projects.
> Checking better I can find a reference of this layer in the "Identifiable layer"
> tab of Project properties.
> Saving project as.... will not purge the file.
If you dont want the layer to be in the project anymore:
Move the project file to another location, or rename/move the unwanted
tif or the layers folder.
Opening the project will give you the bad layers handling dialogue.
Close that without actions, and save the project. That should remove the
unwanted layer from the project.
>
> As you can see in the same file other traces of older files are still present in
> the xml, for instance near lines126 and following: a list of vector layer with
> snapping turned on. This does not produce any error, but getting them removed
> when layer is removed is probably cleaner.
Yes, but thats another -minor- problem.
I have not found a solution for that.
Greetings,
André Joost
More information about the Qgis-user
mailing list