[Qgis-developer] [Qgis-user] Query Layer / Rule Based Rendering Problem

Nathan Woodrow madmanwoo at gmail.com
Fri Jun 1 02:46:27 PDT 2012

I had this issue the other day when I used the Copy Style function.
Must be a bug. Can you fill a ticket for it.


Sent from some fancy phone looking thingo
From: James Stott
Sent: 1/06/2012 7:31 PM
To: qgis-user at lists.osgeo.org
Cc: qgis-developer at lists.osgeo.org
Subject: Re: [Qgis-user] Query Layer / Rule Based Rendering Problem
To update this post,

I have compared the project file code for both the layer that works and
the layer that doesn't and I have found differences in the
customproperties section. This section does not exist in the layer that
works - it only exists for the layer that I copied the style for.
Removing it makes the layer show on the map.

                <property key="labeling" value="pal"/>
                <property key="labeling/addDirectionSymbol"
                <property key="labeling/bufferColorB" value="255"/>
                <property key="labeling/bufferColorG" value="255"/>
                <property key="labeling/bufferColorR" value="255"/>
                <property key="labeling/bufferSize" value="1"/>
                <property key="labeling/dataDefinedProperty0" value=""/>
                <property key="labeling/dataDefinedProperty1" value=""/>
                <property key="labeling/dataDefinedProperty10"
                <property key="labeling/dataDefinedProperty11"
                <property key="labeling/dataDefinedProperty12"
                <property key="labeling/dataDefinedProperty13"
                <property key="labeling/dataDefinedProperty14"
                <property key="labeling/dataDefinedProperty2" value=""/>
                <property key="labeling/dataDefinedProperty3" value=""/>
                <property key="labeling/dataDefinedProperty4" value=""/>
                <property key="labeling/dataDefinedProperty5" value=""/>
                <property key="labeling/dataDefinedProperty6" value=""/>
                <property key="labeling/dataDefinedProperty7" value=""/>
                <property key="labeling/dataDefinedProperty8" value=""/>
                <property key="labeling/dataDefinedProperty9"
                <property key="labeling/decimals" value="0"/>
                <property key="labeling/dist" value="0"/>
                <property key="labeling/distInMapUnits" value="false"/>
                <property key="labeling/enabled" value="true"/>
                <property key="labeling/fieldName" value="number"/>
                <property key="labeling/fontFamily" value="MS Shell Dlg
                <property key="labeling/fontItalic" value="false"/>
                <property key="labeling/fontSize" value="8.25"/>
                <property key="labeling/fontSizeInMapUnits"
                <property key="labeling/fontStrikeout" value="false"/>
                <property key="labeling/fontUnderline" value="false"/>
                <property key="labeling/fontWeight" value="50"/>
                <property key="labeling/formatNumbers" value="false"/>
                <property key="labeling/isExpression" value="false"/>
                <property key="labeling/labelPerPart" value="false"/>
                <property key="labeling/mergeLines" value="false"/>
                <property key="labeling/minFeatureSize" value="0"/>
                <property key="labeling/obstacle" value="true"/>
                <property key="labeling/placement" value="1"/>
                <property key="labeling/placementFlags" value="0"/>
                <property key="labeling/plussign" value="true"/>
                <property key="labeling/priority" value="5"/>
                <property key="labeling/scaleMax" value="0"/>
                <property key="labeling/scaleMin" value="0"/>
                <property key="labeling/textColorB" value="0"/>
                <property key="labeling/textColorG" value="0"/>
                <property key="labeling/textColorR" value="0"/>
                <property key="labeling/wrapChar" value=""/>

Using QGIS 1.8.0 on Windows 7


James Stott BSc (Hons) MSc | Senior Professional
Nicholas Pearson Associates | 30 Brock Street | Bath | BA1 2LN
T: 01225 445548 | M: -

-----Original Message-----
From: qgis-user-bounces at lists.osgeo.org
[mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of James Stott
Sent: 31 May 2012 16:22
To: qgis-user at lists.osgeo.org
Subject: [Qgis-user] Query Layer / Rule Based Rendering Problem

I have created a query in the DB Manager SQL Window (data is in a
PostGIS database). The query is then added to the map as a layer.

I copy the style from another layer (rule based style), paste it to my
query layer and the polygons disappear from the map and QGIS gives a
nextFeature() without select() error. This also happens if I apply a qml
style file to the layer.

If I change the styles back to Single Symbol they do not come back. I
can see the records in the Attribute table, and I can select them and
zoom to them on the map, I just cannot see them.

I have to re-add the query layer using the DB Manager SQL window again.

It only seems to be the polygon layers that cause problems at the

Does anyone know the cause of this?


James Stott BSc (Hons) MSc | Senior Professional Nicholas Pearson
Associates | 30 Brock Street | Bath | BA1 2LN
T: 01225 445548 | M: -


This Electronic Transmission is intended only for the attention of the
addressee. It may contain privileged and confidential information. If
you are not the person for whom it is intended, you must not copy,
distribute or take any action in reliance on it. If you have received
this electronic transmission in error please notify us immediately by
telephone, delete the transmission and destroy any hard copies.
Nicholas Pearson Associates has used all reasonable efforts to ensure
that this message and any attachments are free from viruses.
Nicholas Pearson Associates, 30 Brock Street, Bath, BA1 2LN , Tel: +44
(0) 01225 445548, Fax: +44 (0) 01225 312387, Website:
Qgis-user mailing list
Qgis-user at lists.osgeo.org
Qgis-user mailing list
Qgis-user at lists.osgeo.org

More information about the Qgis-developer mailing list