Bug report #16932
Updated by Giovanni Manghi over 7 years ago
*New description:*
In the attached file there is a project (F119849_plan.qgs) that when loaded in QGIS it loads completely empty, despite the layers definitions are ok (and the data available). It turns that there are two query layers (created within QGIS) that if removed will "fix" the problem > the rest of the layers in the project (included other query layers) are loaded normally.
The two offending layers are
fossé_emprise
fossé_emprise2
the definition of the first (as example) is:
@ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
<extent>
<xmin>1523346.35480000078678131</xmin>
<ymin>6238508.21950000151991844</ymin>
<xmax>1523567.49449999630451202</xmax>
<ymax>6238690.22529999911785126</ymax>
</extent>
<id>fossé_emprise220170725120837237</id>
<datasource>?query=select%20f.num,%20st_union(geometry)%20as%20geom%20from%20%22foss%C3%A9_emprise%22%20f%0D%0Agroup%20by%20num</datasource>
<keywordList>
<value></value>
</keywordList>
<layername>fossé_emprise2</layername>
<srs>
<spatialrefsys>
<proj4>+proj=lcc +lat_1=46.25 +lat_2=47.75 +lat_0=47 +lon_0=3 +x_0=1700000 +y_0=6200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>1766</srsid>
<srid>3947</srid>
<authid>EPSG:3947</authid>
<description>RGF93 / CC47</description>
<projectionacronym>lcc</projectionacronym>
<ellipsoidacronym>GRS80</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</srs>
<provider encoding="UTF-8">virtual</provider>
<previewExpression>COALESCE( "num", '<NULL>' )</previewExpression>
<vectorjoins/>
<layerDependencies>
<layer id="fossé_emprise20170725120248650"/>
</layerDependencies>
<expressionfields/>
<map-layer-style-manager current="">
<map-layer-style name=""/>
</map-layer-style-manager>
<edittypes>
<edittype widgetv2type="TextEdit" name="num">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
</edittypes>
<renderer-v2 forceraster="0" symbollevels="0" type="singleSymbol" enableorderby="0">
<symbols>
<symbol alpha="1" clip_to_extent="1" type="fill" name="0">
<layer pass="0" class="SimpleFill" locked="0">
<prop k="border_width_map_unit_scale" v="0,0,0,0,0,0"/>
<prop k="color" v="129,235,16,255"/>
<prop k="joinstyle" v="bevel"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="0,0,0,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0.26"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="style" v="solid"/>
</layer>
</symbol>
</symbols>
<rotation/>
<sizescale scalemethod="diameter"/>
</renderer-v2>
<labeling type="simple"/>
<customproperties/>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerTransparency>0</layerTransparency>
<displayfield>num</displayfield>
<label>0</label>
<labelattributes>
<label fieldname="" text="Étiquette"/>
<family fieldname="" name="MS Shell Dlg 2"/>
<size fieldname="" units="pt" value="12"/>
<bold fieldname="" on="0"/>
<italic fieldname="" on="0"/>
<underline fieldname="" on="0"/>
<strikeout fieldname="" on="0"/>
<color fieldname="" red="0" blue="0" green="0"/>
<x fieldname=""/>
<y fieldname=""/>
<offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
<angle fieldname="" value="0" auto="0"/>
<alignment fieldname="" value="center"/>
<buffercolor fieldname="" red="255" blue="255" green="255"/>
<buffersize fieldname="" units="pt" value="1"/>
<bufferenabled fieldname="" on=""/>
<multilineenabled fieldname="" on=""/>
<selectedonly on=""/>
</labelattributes>
<annotationform></annotationform>
<excludeAttributesWMS/>
<excludeAttributesWFS/>
<attributeactions/>
<editform></editform>
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<widgets/>
<conditionalstyles>
<rowstyles/>
<fieldstyles/>
</conditionalstyles>
</maplayer>
@
*Old description:*
I encounter the problem more and more often and it begins seriously to become embarrassing : I open a project of yesterday and it is empty or I just have the title groups, groups emptied of their layers. And the layers of the project are shp and virtual layers resulting from queries.
The .qgs has hundreds of kilos and when I edit it, I find my layers in the tags, the paths are good, I have no messages like what tags are badly closed and file is not truncated. Is project finally lost ? Is there a way to get my projects back ?
Thanks
In the attached file there is a project (F119849_plan.qgs) that when loaded in QGIS it loads completely empty, despite the layers definitions are ok (and the data available). It turns that there are two query layers (created within QGIS) that if removed will "fix" the problem > the rest of the layers in the project (included other query layers) are loaded normally.
The two offending layers are
fossé_emprise
fossé_emprise2
the definition of the first (as example) is:
@ <maplayer minimumScale="0" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
<extent>
<xmin>1523346.35480000078678131</xmin>
<ymin>6238508.21950000151991844</ymin>
<xmax>1523567.49449999630451202</xmax>
<ymax>6238690.22529999911785126</ymax>
</extent>
<id>fossé_emprise220170725120837237</id>
<datasource>?query=select%20f.num,%20st_union(geometry)%20as%20geom%20from%20%22foss%C3%A9_emprise%22%20f%0D%0Agroup%20by%20num</datasource>
<keywordList>
<value></value>
</keywordList>
<layername>fossé_emprise2</layername>
<srs>
<spatialrefsys>
<proj4>+proj=lcc +lat_1=46.25 +lat_2=47.75 +lat_0=47 +lon_0=3 +x_0=1700000 +y_0=6200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</proj4>
<srsid>1766</srsid>
<srid>3947</srid>
<authid>EPSG:3947</authid>
<description>RGF93 / CC47</description>
<projectionacronym>lcc</projectionacronym>
<ellipsoidacronym>GRS80</ellipsoidacronym>
<geographicflag>false</geographicflag>
</spatialrefsys>
</srs>
<provider encoding="UTF-8">virtual</provider>
<previewExpression>COALESCE( "num", '<NULL>' )</previewExpression>
<vectorjoins/>
<layerDependencies>
<layer id="fossé_emprise20170725120248650"/>
</layerDependencies>
<expressionfields/>
<map-layer-style-manager current="">
<map-layer-style name=""/>
</map-layer-style-manager>
<edittypes>
<edittype widgetv2type="TextEdit" name="num">
<widgetv2config IsMultiline="0" fieldEditable="1" UseHtml="0" labelOnTop="0"/>
</edittype>
</edittypes>
<renderer-v2 forceraster="0" symbollevels="0" type="singleSymbol" enableorderby="0">
<symbols>
<symbol alpha="1" clip_to_extent="1" type="fill" name="0">
<layer pass="0" class="SimpleFill" locked="0">
<prop k="border_width_map_unit_scale" v="0,0,0,0,0,0"/>
<prop k="color" v="129,235,16,255"/>
<prop k="joinstyle" v="bevel"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="0,0,0,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0.26"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="style" v="solid"/>
</layer>
</symbol>
</symbols>
<rotation/>
<sizescale scalemethod="diameter"/>
</renderer-v2>
<labeling type="simple"/>
<customproperties/>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerTransparency>0</layerTransparency>
<displayfield>num</displayfield>
<label>0</label>
<labelattributes>
<label fieldname="" text="Étiquette"/>
<family fieldname="" name="MS Shell Dlg 2"/>
<size fieldname="" units="pt" value="12"/>
<bold fieldname="" on="0"/>
<italic fieldname="" on="0"/>
<underline fieldname="" on="0"/>
<strikeout fieldname="" on="0"/>
<color fieldname="" red="0" blue="0" green="0"/>
<x fieldname=""/>
<y fieldname=""/>
<offset x="0" y="0" units="pt" yfieldname="" xfieldname=""/>
<angle fieldname="" value="0" auto="0"/>
<alignment fieldname="" value="center"/>
<buffercolor fieldname="" red="255" blue="255" green="255"/>
<buffersize fieldname="" units="pt" value="1"/>
<bufferenabled fieldname="" on=""/>
<multilineenabled fieldname="" on=""/>
<selectedonly on=""/>
</labelattributes>
<annotationform></annotationform>
<excludeAttributesWMS/>
<excludeAttributesWFS/>
<attributeactions/>
<editform></editform>
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<widgets/>
<conditionalstyles>
<rowstyles/>
<fieldstyles/>
</conditionalstyles>
</maplayer>
@
*Old description:*
I encounter the problem more and more often and it begins seriously to become embarrassing : I open a project of yesterday and it is empty or I just have the title groups, groups emptied of their layers. And the layers of the project are shp and virtual layers resulting from queries.
The .qgs has hundreds of kilos and when I edit it, I find my layers in the tags, the paths are good, I have no messages like what tags are badly closed and file is not truncated. Is project finally lost ? Is there a way to get my projects back ?
Thanks