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

James Stott James.Stott at npaconsult.co.uk
Fri Jun 1 02:31:22 PDT 2012


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.

<customproperties>
                <property key="labeling" value="pal"/>
                <property key="labeling/addDirectionSymbol"
value="false"/>
                <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"
value="16"/>
                <property key="labeling/dataDefinedProperty11"
value=""/>
                <property key="labeling/dataDefinedProperty12"
value=""/>
                <property key="labeling/dataDefinedProperty13"
value=""/>
                <property key="labeling/dataDefinedProperty14"
value=""/>
                <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"
value="15"/>
                <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
2"/>
                <property key="labeling/fontItalic" value="false"/>
                <property key="labeling/fontSize" value="8.25"/>
                <property key="labeling/fontSizeInMapUnits"
value="false"/>
                <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 


James Stott BSc (Hons) MSc | Senior Professional
Nicholas Pearson Associates | 30 Brock Street | Bath | BA1 2LN
T: 01225 445548 | M: -
http://www.npaconsult.co.uk/ 

-----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
moment.

Does anyone know the cause of this?

James 

James Stott BSc (Hons) MSc | Senior Professional Nicholas Pearson
Associates | 30 Brock Street | Bath | BA1 2LN
T: 01225 445548 | M: -
http://www.npaconsult.co.uk/ 


http://www.npaconsult.co.uk/http://www.npaconsult.co.uk/about-news.asp

http://www.npaconsult.co.uk/terms.asp
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:
http://www.npaconsult.co.uk/
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the Qgis-developer mailing list