[Qgis-user] SQL query for style
Hi, I have a point database loaded with columns Z1 to Z6, where Z6 has values 0,0.5 and 1. What I am trying to do with the symbology is just to get it to plot and colour the depths (Z1) only where Z6=0 Can this be done from the style option for the layer? So what I want to do is: IF Z6=0 PLOT Z1 Sure this is very simple but can't see it :) Cheers Lester ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] SQL query for style
Hi Lester, you can either use in categorized style such an expression CASE WHEN Z6 = 0 THEN Z1 END. You'll get all the Z1 classes with a zero-value Z6 and one class without value which is for features with a Z60. You can delete this one or set it invisible. Envoyé depuis mon HTC - Reply message - De : Carlos López PSIG carlos.lo...@psig.es Pour : qgis-user@lists.osgeo.org qgis-user@lists.osgeo.org Objet : [Qgis-user] SQL query for style Date : ven., juin 26, 2015 13:52 Hi Lester, You must choose styles based on rules! Properties -- Styles -- Rule-based Regards, * http://www.psig.es* *Carlos López Quintanilla* www.psig.es carlos.lo...@psig.es +34 699.680.261 2015-06-26 12:57 GMT+02:00 Lester Anderson arctica1...@gmail.com: Hi, I have a point database loaded with columns Z1 to Z6, where Z6 has values 0,0.5 and 1. What I am trying to do with the symbology is just to get it to plot and colour the depths (Z1) only where Z6=0 Can this be done from the style option for the layer? So what I want to do is: IF Z6=0 PLOT Z1 Sure this is very simple but can't see it :) Cheers Lester ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] SQL query for style
It is the categorised / graduated render I was looking at. I could not figure out the correct SQL expression for the column section; how would this expression be written here? eg Find all values where Z6=0 and render Z1 for the symbology associated with that particular Z6 value Cheers Lester On 26 June 2015 at 13:22, Andreas Neumann a.neum...@carto.net wrote: Hi Lester, You can either use an expression which uses more than one column (for graduated or categorized renderer) or the rule based renderer mentioned by Carlos, which is more powerful. Andreas On 26.06.2015 12:57, Lester Anderson wrote: Hi, I have a point database loaded with columns Z1 to Z6, where Z6 has values 0,0.5 and 1. What I am trying to do with the symbology is just to get it to plot and colour the depths (Z1) only where Z6=0 Can this be done from the style option for the layer? So what I want to do is: IF Z6=0 PLOT Z1 Sure this is very simple but can't see it :) Cheers Lester ___ Qgis-user mailing listQgis-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] SQL query for style
Just press on the E Expression button and concatenate the two columns: Z1 || ' ' || Z6 Press Categorize and delete all the combinations you don't need. Andreas On 26.06.2015 14:38, Lester Anderson wrote: It is the categorised / graduated render I was looking at. I could not figure out the correct SQL expression for the column section; how would this expression be written here? eg Find all values where Z6=0 and render Z1 for the symbology associated with that particular Z6 value Cheers Lester On 26 June 2015 at 13:22, Andreas Neumann a.neum...@carto.net mailto:a.neum...@carto.net wrote: Hi Lester, You can either use an expression which uses more than one column (for graduated or categorized renderer) or the rule based renderer mentioned by Carlos, which is more powerful. Andreas On 26.06.2015 12:57, Lester Anderson wrote: Hi, I have a point database loaded with columns Z1 to Z6, where Z6 has values 0,0.5 and 1. What I am trying to do with the symbology is just to get it to plot and colour the depths (Z1) only where Z6=0 Can this be done from the style option for the layer? So what I want to do is: IF Z6=0 PLOT Z1 Sure this is very simple but can't see it :) Cheers Lester ___ Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org mailto:Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] SQL query for style
Hi Lester, You can either use an expression which uses more than one column (for graduated or categorized renderer) or the rule based renderer mentioned by Carlos, which is more powerful. Andreas On 26.06.2015 12:57, Lester Anderson wrote: Hi, I have a point database loaded with columns Z1 to Z6, where Z6 has values 0,0.5 and 1. What I am trying to do with the symbology is just to get it to plot and colour the depths (Z1) only where Z6=0 Can this be done from the style option for the layer? So what I want to do is: IF Z6=0 PLOT Z1 Sure this is very simple but can't see it :) Cheers Lester ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] SQL query for style
Hi Lester, You must choose styles based on rules! Properties -- Styles -- Rule-based Regards, * http://www.psig.es* *Carlos López Quintanilla* www.psig.es carlos.lo...@psig.es +34 699.680.261 2015-06-26 12:57 GMT+02:00 Lester Anderson arctica1...@gmail.com: Hi, I have a point database loaded with columns Z1 to Z6, where Z6 has values 0,0.5 and 1. What I am trying to do with the symbology is just to get it to plot and colour the depths (Z1) only where Z6=0 Can this be done from the style option for the layer? So what I want to do is: IF Z6=0 PLOT Z1 Sure this is very simple but can't see it :) Cheers Lester ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user